A file processing method and server

By setting target function buttons on the server and responding to trigger information to determine the cleanup or recovery function, the problem of existing server operation buttons being unable to meet function growth is solved, file cleanup and configuration recovery are realized, and the usage scenarios and operational convenience of the server are expanded. .

CN113010222BActive Publication Date: 2024-10-29ZHONGCHENG HUALONG COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110177725.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-07
Publication Date
2024-10-29
Estimated Expiration
2041-02-07

AI Technical Summary

Technical Problem

The power on and reset buttons of existing servers cannot meet the needs of growing functions, limiting the usage scenarios of the server.

Method used

Set target function buttons on the server, and use these buttons to respond to trigger information to determine the target function to be executed, realize cleanup or recovery functions, and expand the operation functions of the server.

Benefits of technology

Through the triggering of target function buttons, the server can effectively perform file cleaning and configuration recovery, meet more needs, expand usage scenarios, and improve the efficiency and security of developers and testers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113010222B_ABST
    Figure CN113010222B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and server for file processing, and relates to the field of computer technology. A specific implementation of the method can be applied to a server, wherein a target function button is provided on the server, and the target function button is configured with at least one target function, and the method comprises: in response to the target function button being triggered, determining the target function to be executed according to the trigger information corresponding to the triggered target function; when the target function to be executed is a cleanup function, determining the first to-be-processed file corresponding to the cleanup function according to the file storage path, file type and / or the effective time of the file indicated in the cleanup configuration file, and cleaning the first to-be-processed file; when the target function to be executed is a recovery function, reading the second to-be-processed file from the storage space, and configuring the server according to the second to-be-processed file. This implementation enables the server to meet more requirements and further expands the use scenarios of the server.
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 processing method and a server. Background Art

[0002] A server is a high-performance computer with high-speed CPU computing power, long-term reliable operation, strong I / O external data throughput and good scalability. The server is the core node of the network, providing computing or application services for other clients (such as PCs, smart phones, ATM terminals and even large equipment such as train systems).

[0003] However, existing servers only have conventional operation buttons such as power on, power off and reset. As the functions that servers need to perform increase, conventional operation buttons such as power on, power off and reset and their corresponding power on, power off and reset functions obviously cannot meet the needs, thereby limiting the use scenarios of the servers. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a file processing method and server, on which a target function button capable of realizing at least one target function is provided, and the server can respond to the triggering of the target function button, determine whether the target function to be executed is a cleaning function or a recovery function, and realize the corresponding target function, thereby enabling the server to meet more demands and further expand the usage scenarios of the server.

[0005] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing a file is provided.

[0006] A file processing method according to an embodiment of the present invention is applied to a server, wherein a target function button is provided on the server, and the target function button is configured with at least one target function; the method comprises:

[0007] In response to the target function button being triggered, determining the target function to be executed according to the trigger information corresponding to the triggered target function;

[0008] In the case where the target function to be executed is a cleaning function, determining a first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file, and cleaning the first to-be-processed file;

[0009] When the target function to be executed is a recovery function, a second file to be processed is read from the storage space, and the server is configured according to the second file to be processed.

[0010] Optionally,

[0011] A plurality of target function buttons are arranged on the server, and the plurality of target function buttons respectively correspond to different target functions.

[0012] Optionally,

[0013] When the target function button corresponds to the cleaning function and the target function button is a physical button, the target function button is set on the mainboard of the server, and the target function button is not displayed outside the chassis of the server.

[0014] Optionally,

[0015] When the target function button corresponds to the recovery function and the target function button is a physical button, the target function button is arranged on the rear side panel of the server.

[0016] Optionally,

[0017] The method further includes:

[0018] A cleanup configuration file is generated according to a storage path corresponding to at least one test task on the server, a file type generated by the test task, and / or a running time of the test task.

[0019] Optionally,

[0020] In the case where the target function to be executed is a recovery function, the method further includes:

[0021] Outputting a configuration prompt for configuring the server according to the second file to be processed;

[0022] In response to receiving confirmation information for the configuration prompt, configuring the server according to the second file to be processed is performed according to the confirmation information.

[0023] Optionally,

[0024] In the case where each target function button corresponds to multiple target functions, each target function corresponds to a different trigger count threshold and / or trigger duration threshold;

[0025] The target function to be executed is determined according to the trigger information corresponding to the trigger target function, including:

[0026] The target function to be executed corresponding to the trigger information is determined according to the trigger number threshold and / or trigger duration threshold satisfied by the continuous trigger number and / or continuous trigger duration indicated by the trigger information.

[0027] Optionally,

[0028] The target function button is a virtual button, and each target function button has a corresponding trigger permission; the method also includes:

[0029] Obtain the user's authentication information and determine the user's usage rights based on the authentication information;

[0030] When the usage permission matches the trigger permission, a virtual button is displayed on the function interface of the server.

[0031] To achieve the above objective, according to another aspect of an embodiment of the present invention, a server is provided.

[0032] A server according to an embodiment of the present invention is provided with a target function button, wherein the target function button is configured with at least one target function; the server comprises a target function determination module, a cleaning module and a configuration module; wherein:

[0033] A target function determination module, for determining a target function to be executed according to trigger information corresponding to the triggered target function in response to the target function button being triggered;

[0034] A cleaning module, for determining, when the target function to be executed is a cleaning function, a first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file, and cleaning the first to-be-processed file;

[0035] The configuration module is used to read the second to-be-processed file from the storage space when the target function to be executed is a recovery function, and configure the server according to the second to-be-processed file.

[0036] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for file processing is provided.

[0037] An electronic device for file processing according to an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method for file processing according to an embodiment of the present invention.

[0038] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided.

[0039] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, a file processing method according to an embodiment of the present invention is implemented.

[0040] One embodiment of the above invention has the following advantages or beneficial effects: a target function button capable of realizing at least one target function is provided on the server, and the server can respond to the triggering of the target function button, determine whether the target function to be executed is a cleaning function or a recovery function, and realize the corresponding target function, thereby enabling the server to meet more requirements and further expanding the usage scenarios of the server.

[0041] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0043] Figure 1 is a schematic diagram of main steps of a file processing method according to an embodiment of the present invention;

[0044] Figure 2 This is an example diagram of a server motherboard;

[0045] Figure 3 is a schematic diagram of the main steps of a method for determining and executing a cleaning function according to an embodiment of the present invention;

[0046] Figure 4 is an example diagram of a rear panel of a server;

[0047] Figure 5 is a schematic diagram of main steps of a method for determining and executing a recovery function according to an embodiment of the present invention;

[0048] Figure 6 is a schematic diagram of main modules of a server according to an embodiment of the present invention;

[0049] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0050] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0052] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0053] Figure 1 It is a schematic diagram of main steps of a file processing method according to an embodiment of the present invention.

[0054] like Figure 1 As shown, a file processing method of an embodiment of the present invention is applied to a server, a target function button is provided on the server, and the target function button is configured with at least one target function; the method mainly comprises the following steps:

[0055] Step S101: In response to a target function button being triggered, determining a target function to be executed according to trigger information corresponding to the triggered target function.

[0056] In an embodiment of the present invention, a plurality of target function buttons may be provided on the server, and the plurality of target function buttons respectively correspond to different target functions. For example, a reset button corresponding to a reset function, a switch button corresponding to a switch function, a one-key cleanup button corresponding to a cleanup function, and a one-key restore button corresponding to a restore function may be provided on the server.

[0057] In the embodiment of the present invention, one target function button may correspond to one target function or multiple target functions, and this solution does not impose any specific limitation on this.

[0058] In an embodiment of the present invention, when each target function button corresponds to multiple target functions, each target function may correspond to a different trigger count threshold and / or trigger duration threshold; at this time, the process of determining the target function to be executed according to the trigger information corresponding to the triggered target function may include: determining the target function to be executed corresponding to the trigger information according to the trigger count threshold and / or trigger duration threshold satisfied by the continuous trigger count and / or continuous trigger duration indicated by the trigger information.

[0059] For example, a target function button may be set on the server, and the target function button corresponds to four target functions: switch, reset, clean and restore. The triggering threshold of the switch function corresponding to the target function button is four times, the triggering threshold of the reset function is three times, the triggering threshold of the clean function is two times, and the triggering threshold of the restore function is one time. Based on this, if the user presses the target function button once, the server executes the restore function; if the user presses the target function button twice in succession, the server executes the clean function; if the user presses the target function button three times in succession, the server executes the reset function; if the user presses the target function button four times in succession, the server executes the switch function.

[0060] Furthermore, when each target function button corresponds to multiple target functions, and each target function corresponds to a different triggering number threshold, the server can also pop up a confirmation operation reminder on the function interface connected to itself after monitoring the user's triggering number, so as to confirm whether the monitored triggering number is correct and prevent the server from executing a function contrary to the user's intention due to user operation errors or poor operation of the target function button. For example, after monitoring the user's triggering number, the server determines the target function to be executed corresponding to the triggering number, and pops up a confirmation operation reminder on the function interface connected to itself. The confirmation operation reminder can be: the function you are currently triggering is "***", where "***" is the name of the target function to be executed. If the target function button is short pressed or not triggered within 5 seconds, the corresponding operation is confirmed, and the target function button is long pressed for more than 3 seconds, the corresponding operation is canceled; the confirmation operation reminder can also be: if the user presses the target function button once, or does not trigger the target function button within 5 seconds, the corresponding operation is confirmed, and if the target function button is pressed more than twice in a row, the corresponding operation is canceled. The specific content of the confirmation operation reminder is not specifically limited in this scheme.

[0061] In addition, each target function may also correspond to a different trigger duration threshold. For example, the trigger duration threshold of the switch function corresponding to the target function button is four seconds, the trigger duration threshold of the reset function is three seconds, the trigger duration threshold of the cleanup function is two seconds, and the trigger duration threshold of the restore function is one second. Based on this, if the user presses the target function button for one second, the server executes the restore function; if the user presses the target function button for two seconds, the server executes the cleanup function; if the user presses the target function button for three seconds, the server executes the reset function; if the user presses the target function button for four seconds, the server executes the switch function.

[0062] Furthermore, when each target function button corresponds to multiple target functions, and each target function corresponds to a different trigger duration threshold, the server can also pop up a confirmation operation reminder on the function interface connected to itself after monitoring the user's trigger duration, so as to confirm whether the monitored trigger duration is correct and prevent the server from executing a function contrary to the user's intention due to the user's countdown error or poor operation of the target function button. For example, after monitoring the user's trigger duration, the server determines the target function to be executed corresponding to the trigger duration, and pops up a confirmation operation reminder on the function interface connected to itself, and the confirmation operation reminder can be: the function you are currently triggering is "***", where "***" is the name of the target function to be executed, if the target function button is short pressed, or the target function button is not triggered within 5 seconds, it means confirming the corresponding operation, and long pressing the target function button for more than 3 seconds, canceling the corresponding operation; the confirmation operation reminder can also be: if the user presses the target function button once, or the target function button is not triggered within 5 seconds, the corresponding operation is confirmed, and if the target function button is pressed more than twice in a row, the corresponding operation is canceled. This solution does not impose any specific restrictions on the specific content of the confirmation operation reminder.

[0063] Step S102: When the target function to be executed is a cleaning function, determine the first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file, and clean the first to-be-processed file.

[0064] In an embodiment of the present invention, when the target function button corresponds to a cleaning function and is a physical button, the target function button may be disposed on a mainboard of the server, and the target function button is not displayed on the outside of a chassis of the server.

[0065] like Figure 2 As shown, in a preferred embodiment of the present invention, three target function buttons are arranged on the mainboard of the server, namely: a reset button RST corresponding to the reset function, a switch button PWR corresponding to the switch function, and a one-key cleanup button OCD corresponding to the cleanup function. Among them, the one-key cleanup button OCD is not led out through the chassis, and is mainly used by developers and testers to clean up the server, so as to avoid the user's mis-triggering during daily use. At the same time, it enables developers and testers to realize the one-key cleanup function of the test file by triggering the one-key cleanup button according to actual needs, thereby improving the recovery efficiency and convenience of operation of developers and testers during testing, and is conducive to solving the problem of uninstalling the test software and quickly clearing the test legacy records, junk files, etc. after the server test acceptance is completed by developers and testers.

[0066] In an embodiment of the present invention, a method for determining and executing a cleanup function is as follows: Figure 3 As shown, the method mainly includes the following steps:

[0067] Step S301: performing inspection by the CPU to detect whether the target function button corresponding to the cleaning function is triggered;

[0068] Step S302: when the CPU detects that the target function button corresponding to the cleaning function is triggered, a cleaning program is started, wherein the cleaning program indicates a corresponding cleaning configuration file;

[0069] Step S303: determining a first file to be processed according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file;

[0070] Step S304: cleaning the first to-be-processed file to execute the cleaning task in the cleaning configuration file;

[0071] Step S305: When the cleaning program is completed, exit the cleaning program and return to step S301.

[0072] In the embodiment of the present invention, the cleaning program can be stored in a protection partition to avoid being deleted by the user or the cleaning software.

[0073] In an embodiment of the present invention, the cleanup configuration file can be configured by development and testing personnel, who can, according to the system testing process, include all programs and file records that need to be cleaned up and are not related to user use into the cleanup configuration file.

[0074] In an embodiment of the present invention, the cleanup configuration file may also be automatically generated. Specifically, the cleanup configuration file may be generated based on a storage path corresponding to at least one test task on the server, a file type generated by the test task, and / or a running time of the test task.

[0075] In the embodiment of the present invention, the first file to be processed is a temporary test file and can be saved on any disk.

[0076] Step S103: when the target function to be executed is a recovery function, a second file to be processed is read from the storage space, and the server is configured according to the second file to be processed.

[0077] In an embodiment of the present invention, when the target function button corresponds to a restore function and the target function button is a physical button, the target function button may be disposed on a rear panel of the server.

[0078] like Figure 4As shown, in a preferred embodiment of the present invention, a one-key restore button OKR corresponding to the recovery function is provided on the rear panel of the server. The one-key restore button is mainly used to restore the system when the user uses the server, so that after the user parameter setting error or the system crashes, the factory recovery can be quickly realized, which not only saves time but also reduces the risk of system installation and use for the user. The one-key restore button is set on the rear panel of the server, which is convenient for users to use and is hidden and not easily touched by users by mistake.

[0079] In the embodiment of the present invention, the one-key recovery button may also be arranged on the edge of the mainboard, and a relatively concealed position may be reserved through the chassis.

[0080] In an embodiment of the present invention, when the target function to be executed is a recovery function, the method also includes: outputting a configuration prompt about configuring the server according to the second file to be processed; in response to receiving confirmation information for the configuration prompt, executing the configuration of the server according to the second file to be processed according to the confirmation information.

[0081] In an embodiment of the present invention, a method for determining and executing a recovery function is as follows: Figure 5 As shown, the method mainly includes the following steps:

[0082] Step S501: performing inspection by the CPU to detect whether the target function button corresponding to the restore function is triggered;

[0083] Step S502: When the CPU detects that the target function button corresponding to the recovery function is triggered, the recovery program is started;

[0084] Step S503: outputting a configuration prompt for configuring the server according to the second to-be-processed file on a function interface connected to the server, and receiving a response corresponding to the configuration prompt;

[0085] Step S504: when receiving confirmation information in response to receiving the configuration prompt, reading a preset second to-be-processed file from the storage space;

[0086] Step S505: modifying the current configuration of the server according to the preset second file to be processed to obtain a modified current configuration;

[0087] Step S506: Restart the server to make the modified current configuration effective, and return to step S501.

[0088] In the above embodiment, the second file to be processed is a system configuration file related to the operation of the server system. When the target function button corresponding to the recovery function is triggered, the server can automatically determine the relevant system configuration file and configure the server according to the system configuration file, thereby realizing a one-key recovery function for the server, thereby realizing rapid recovery of problems such as parameter setting errors or system paralysis caused by improper use of the system during the user's use of the server.

[0089] In the embodiment of the present invention, the recovery program can be stored in the protection partition to avoid being deleted by the user or the cleaning software.

[0090] In an embodiment of the present invention, after the recovery program is started, a configuration prompt for configuring the server according to the second to-be-processed file is first output on the function interface connected to the server, and a response corresponding to the configuration prompt is received. This is similar to the mechanical hidden safety operation, adding a layer of misoperation prevention measures to avoid unintentional recovery. If it is an unintentional recovery, the user can respond to the configuration prompt with a rejection message, and the server will receive the rejection message, and then exit the recovery program and no longer execute the recovery function.

[0091] In the embodiment of the present invention, the second file to be processed is an operating system related file and can be stored on a system disk.

[0092] In the embodiment of the present invention, the target function button can be not only a physical button but also a virtual button. When the target function button is a virtual button, each target function button corresponds to a trigger permission; at this time, the user's authentication information can be further obtained, and the user's use permission can be determined according to the authentication information; only when the use permission matches the trigger permission, the virtual button is displayed on the function interface of the server to further improve the security of the server operation.

[0093] According to a file processing method of an embodiment of the present invention, it can be seen that a target function button capable of realizing at least one target function is provided on the server, and the server can respond to the triggering of the target function button, determine whether the target function to be executed is a cleaning function or a recovery function, and realize the corresponding target function, so that the server can meet more requirements and further expand the use scenarios of the server. In addition, by adding quick operation buttons corresponding to the cleaning function and the recovery function to the server motherboard, combined with specific programs in the system protection partition, specific functions related to cleaning and recovery are quickly executed, thereby realizing the rapid cleaning of junk files and system recovery.

[0094] Figure 6 is a schematic diagram of main modules of a server according to an embodiment of the present invention.

[0095] like Figure 6As shown, a server 600 according to an embodiment of the present invention is provided with a target function button, and the target function button is configured with at least one target function; the server 600 includes a target function determination module 601, a cleaning module 602 and a configuration module 603; wherein:

[0096] A target function determination module 601 is used to determine a target function to be executed according to trigger information corresponding to the triggered target function in response to the target function button being triggered;

[0097] The cleaning module 602 is used to determine the first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file when the target function to be executed is the cleaning function, and clean the first to-be-processed file;

[0098] The configuration module 603 is used to read the second to-be-processed file from the storage space and configure the server according to the second to-be-processed file when the target function to be executed is a recovery function.

[0099] In the embodiment of the present invention, a plurality of target function buttons are arranged on the server 600, and the plurality of target function buttons correspond to different target functions respectively.

[0100] In an embodiment of the present invention, when the target function button corresponds to a cleaning function and is a physical button, the target function button is set on the motherboard of the server, and the target function button is not displayed on the outside of the chassis of the server 600.

[0101] In the embodiment of the present invention, when the target function button corresponds to the restore function and the target function button is a physical button, the target function button is set on the rear panel of the server 600 .

[0102] In an embodiment of the present invention, the cleaning module 602 is further used to generate a cleaning configuration file according to a storage path corresponding to at least one test task on the server, a file type generated by the test task and / or a running time of the test task.

[0103] In an embodiment of the present invention, the configuration module 603 is further used to: output a configuration prompt for configuring the server according to the second file to be processed; in response to receiving confirmation information for the configuration prompt, execute configuration of the server according to the second file to be processed according to the confirmation information.

[0104] In an embodiment of the present invention, when each target function button corresponds to multiple target functions, each target function corresponds to a different trigger count threshold and / or trigger duration threshold; the target function determination module 601 is further used to: determine the target function to be executed corresponding to the trigger information based on the trigger count threshold and / or trigger duration threshold satisfied by the continuous trigger count and / or continuous trigger duration indicated by the trigger information.

[0105] In an embodiment of the present invention, the target function button is a virtual button, and each target function button corresponds to a trigger permission; the target function determination module 601 is further used to: obtain the user's authentication information, and determine the user's usage permission based on the authentication information; when the usage permission matches the trigger permission, the virtual button is displayed on the server's function interface.

[0106] It can be seen that a server according to an embodiment of the present invention is provided with a target function button capable of realizing at least one target function, and can respond to the triggering of the target function button, determine whether the target function to be executed is a cleaning function or a recovery function, and realize the corresponding target function, thereby enabling the server to meet more demands and further expand the usage scenarios of the server.

[0107] Figure 7 An exemplary system architecture 700 of a file processing method or a server to which an embodiment of the present invention can be applied is shown.

[0108] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, a network 704, and an electronic device 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and electronic device 705. Network 704 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0109] The user can use the terminal devices 701, 702, 703 to interact with the electronic device 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0110] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0111] The electronic device 705 may be an electronic device that provides various services, such as a background management electronic device that provides support for shopping websites browsed by users using the terminal devices 701, 702, and 703. The background management electronic device may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information and product information) to the terminal device.

[0112] It should be understood that Figure 7 The number of terminal devices, networks and electronic devices in the embodiment is only for illustration. Any number of terminal devices, networks and electronic devices may be provided according to implementation requirements.

[0113] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0114] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0115] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0116] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0117] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0119] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor, for example, may be described as: a processor including a target function determination module, a cleaning module, and a configuration module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the target function determination module may also be described as "a module for determining a target function to be executed in response to a target function button being triggered according to trigger information corresponding to the triggered target function".

[0120] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to the target function button being triggered, determining the target function to be executed according to the trigger information corresponding to the triggered target function; when the target function to be executed is a cleaning function, determining the first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity time indicated in the cleaning configuration file, and cleaning the first to-be-processed file; when the target function to be executed is a recovery function, reading the second to-be-processed file from the storage space, and configuring the server according to the second to-be-processed file.

[0121] According to the technical solution of an embodiment of the present invention, a target function button capable of realizing at least one target function is provided on the server, which can respond to the triggering of the target function button, determine whether the target function to be executed is a cleaning function or a recovery function, and realize the corresponding target function, thereby enabling the server to meet more demands and further expand the usage scenarios of the server.

[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for file processing, characterized in that: Applied to a server, the server is provided with a plurality of target function buttons, each of the target function buttons is configured with at least one target function, and the plurality of target function buttons respectively correspond to different target functions; including: Perform inspection through the CPU to detect whether the target function button is triggered; in the case where each target function button corresponds to multiple target functions, each of the target functions corresponds to a different triggering number threshold and / or triggering duration threshold; In response to the target function button being triggered, determining the target function to be executed according to the trigger information corresponding to the triggering of the target function, including: determining the target function to be executed corresponding to the trigger information according to a trigger number threshold and / or a trigger duration threshold satisfied by the continuous trigger number and / or continuous trigger duration indicated by the trigger information; In the case where the target function to be executed is a cleaning function, determining a first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file, and cleaning the first to-be-processed file; In a case where the target function to be executed is a recovery function, reading a second file to be processed from a storage space, and configuring the server according to the second file to be processed; When the target function button corresponds to the cleaning function and the target function button is a physical button, the target function button is disposed on a mainboard of the server, and the target function button is not displayed on the outside of a chassis of the server; When the target function button is a virtual button, each of the target function buttons corresponds to a trigger permission, and also includes: obtaining the user's authentication information, and determining the user's usage permission based on the authentication information; when the usage permission matches the trigger permission, displaying the virtual button on the function interface of the server.

2. The method according to claim 1, characterized in that When the target function button corresponds to the recovery function and the target function button is a physical button, the target function button is arranged on the rear side panel of the server.

3. The method according to claim 1, characterized in that Also includes: The cleanup configuration file is generated according to a storage path corresponding to at least one test task on the server, a file type generated by the test task and / or a running time of the test task.

4. The method according to claim 1, characterized in that: In the case where the target function to be executed is a recovery function, the method further includes: Outputting a configuration prompt for configuring the server according to the second file to be processed; In response to receiving confirmation information for the configuration prompt, configuring the server according to the second file to be processed is performed according to the confirmation information.

5. A server, characterized in that: The server is provided with a plurality of target function buttons, each of which is configured with at least one target function, and the plurality of target function buttons respectively correspond to different target functions; the server comprises a target function determination module, a cleaning module and a configuration module; wherein: The target function determination module is used to perform inspections through the CPU to detect whether the target function button is triggered; in the case where each target function button corresponds to multiple target functions, each target function corresponds to a different trigger count threshold and / or trigger duration threshold; in response to the target function button being triggered, determining the target function to be executed according to the trigger information corresponding to the triggering target function, including: determining the target function to be executed corresponding to the trigger information according to the trigger count threshold and / or trigger duration threshold satisfied by the continuous trigger count and / or continuous trigger duration indicated by the trigger information; The cleaning module is used to determine, when the target function to be executed is a cleaning function, a first to-be-processed file corresponding to the cleaning function according to the file storage path, file type and / or file validity period indicated in the cleaning configuration file, and clean up the first to-be-processed file; The configuration module is used to read a second to-be-processed file from the storage space and configure the server according to the second to-be-processed file when the target function to be executed is a recovery function; When the target function button corresponds to the cleaning function and the target function button is a physical button, the target function button is disposed on a mainboard of the server, and the target function button is not displayed on the outside of a chassis of the server; When the target function button is a virtual button, each of the target function buttons corresponds to a trigger permission, and also includes: obtaining the user's authentication information, and determining the user's usage permission based on the authentication information; when the usage permission matches the trigger permission, displaying the virtual button on the function interface of the server.

6. An electronic device for file processing, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Intelligent terminal server based on Internet of Things

    CN106814805A

  • File recovery method and device, computer equipment and storage medium

    CN112084157A