CN115495016A - Log clearing method and device, electronic equipment and storage medium - Google Patents

Log clearing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115495016A
CN115495016A CN202211160487.0A CN202211160487A CN115495016A CN 115495016 A CN115495016 A CN 115495016A CN 202211160487 A CN202211160487 A CN 202211160487A CN 115495016 A CN115495016 A CN 115495016A
Authority
CN
China
Prior art keywords
log
clearing
cleared
storage space
determining
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211160487.0A
Other languages
Chinese (zh)
Inventor
孙志睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GCL Hong Kong Cloud Technology Hainan Co Ltd
Original Assignee
GCL Hong Kong Cloud Technology Hainan Co Ltd
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
Application filed by GCL Hong Kong Cloud Technology Hainan Co Ltd filed Critical GCL Hong Kong Cloud Technology Hainan Co Ltd
Priority to CN202211160487.0A priority Critical patent/CN115495016A/en
Publication of CN115495016A publication Critical patent/CN115495016A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The embodiment of the invention discloses a log clearing method and device, electronic equipment and a storage medium. The method comprises the following steps: responding to a log clearing instruction aiming at a power swapping station platform, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared; and clearing the log to be cleared in the storage space by executing a predefined log clearing script, and releasing the storage space. The technical scheme of the embodiment of the invention solves the problems of time consumption and low efficiency of log clearing in the prior art, reduces the time consumption of log clearing and further improves the efficiency of log clearing.

Description

Log clearing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a log clearing method and apparatus, an electronic device, and a storage medium.
Background
With the development of the power change industry, the number of logs generated by the power change station platform is more and more. Therefore, it is important to clean the logs generated by the substation platform. In the prior art, the cleaning is usually carried out manually. However, the clearing method has the technical problem that the clearing of the log is time-consuming, so that the efficiency of clearing the log is low.
Disclosure of Invention
The invention provides a log clearing method and device, electronic equipment and a storage medium, which are used for reducing the time consumption of log clearing and further improving the efficiency of log clearing.
According to an aspect of the present invention, there is provided a log purging method, including:
responding to a log clearing instruction aiming at a power swapping station platform, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared;
and clearing the log to be cleared in the storage space by executing a predefined log clearing script, and releasing the storage space.
Optionally, the determining a storage space for storing the log to be cleared includes:
and determining the space address of the log to be cleared, and taking the space pointed by the space address as a storage space for storing the log to be cleared.
Optionally, the clearing the log to be cleared in the storage space by executing a predefined log clearing script includes:
loading a predefined log clearing script, and transmitting the space address of the log to be cleared to an entry parameter of the log clearing script;
and clearing the log to be cleared in the storage space by executing the log clearing script with the parameter transmission completed.
Optionally, the releasing the storage space includes:
and releasing the storage space in a space resetting mode.
Optionally, the determining a log to be cleared in the power swapping station platform includes:
acquiring all work logs generated by the power station swapping platform;
and for each working log, if the working log meets a preset log clearing condition, taking the working log as a log to be cleared in the power change station platform.
Optionally, the obtaining of each work log generated by the power swapping station platform includes:
and collecting all working logs generated by the power station changing platform through a pre-deployed distributed publishing and subscribing message system.
Optionally, the method further comprises:
and receiving a log clearing instruction aiming at the power change station platform based on the distributed publishing and subscribing message system.
According to another aspect of the present invention, there is provided a log clearing apparatus. The device includes:
the storage space determining module is used for responding to a log clearing instruction aiming at a power swapping station platform, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared;
and the storage space releasing module is used for clearing the log to be cleared in the storage space and releasing the storage space by executing a predefined log clearing script.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the log purging method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the log purging method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the log clearing instruction aiming at the power swapping station platform is received. And after receiving a log clearing instruction, determining a log to be cleared in the power conversion station platform, and determining a storage space for storing the log to be cleared. In the embodiment of the invention, the storage space for storing the log to be cleared is accurately positioned, so that the log to be cleared stored in the storage space can be cleared more quickly in the follow-up process. And clearing the log to be cleared in the storage space and releasing the storage space by executing a predefined log clearing script. The technical scheme of the embodiment of the invention solves the problems of time consumption and low efficiency of log clearing in the prior art, reduces the time consumption of log clearing and further improves the efficiency of log clearing.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a log clearing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a log clearing apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is understood that the above notification and user authorization process is only illustrative and is not intended to limit the implementation of the present disclosure, and other ways of satisfying the relevant laws and regulations may be applied to the implementation of the present disclosure.
It will be appreciated that the data involved in the subject technology, including but not limited to the data itself, the acquisition or use of the data, should comply with the requirements of the corresponding laws and regulations and related regulations.
Example one
Fig. 1 is a flowchart of a log clearing method according to an embodiment of the present invention, where the present embodiment is applicable to a scenario of clearing a log generated by a substation platform, and the method may be executed by a log clearing apparatus, where the log clearing apparatus may be implemented in a form of hardware and/or software, and the log clearing apparatus may be configured in an electronic device such as a computer or a server.
As shown in fig. 1, the method of the present embodiment includes:
s110, responding to a log clearing instruction aiming at a power swapping station platform, and determining a log to be cleared in the power swapping station platform.
The log clearing instruction can be understood as an instruction for clearing the log of the power conversion station platform. The log flush instruction may carry an instruction generation time to facilitate identification of valid instructions when multiple log flush instructions are received. The log to be cleared can be understood as the log needing to be cleared in the power swapping station platform. The number of logs to be purged may be one, two, or more than two. In practical applications, the number of the logs to be cleared is usually multiple.
Specifically, a log clearing instruction aiming at a power change station platform input by a user is received; or receiving a touch operation (such as a click operation, a sliding operation and the like) acting on a control for generating the log clearing instruction, and generating the log clearing instruction. After the log clearing instruction is received or generated, determining a log to be cleared of the power swapping station platform based on the log clearing instruction.
In this embodiment of the present invention, the determining the log to be cleared in the power swapping station platform includes: acquiring all work logs generated by the power station swapping platform; and for each working log, if the working log meets a preset log clearing condition, taking the working log as a log to be cleared in the power change station platform.
The working log can be understood as a log generated in the running process of the power conversion station platform. In practical applications, the number of logs generated by the power conversion station platform during operation is usually multiple. The preset log clearing condition may be a log clearing condition preset according to an actual requirement, and is not specifically limited herein. For example, the preset log clearing condition may be generated based on at least one of a log type, a log file size, and a log generation time.
As an optional implementation manner in the embodiment of the present invention, for each working log, if a log type of the working log is a cleanable type in a preset log cleaning condition, the working log is taken as a log to be cleaned. It should be noted that the number of the purgeable types in the preset log purging condition may be configured according to actual requirements, and includes one or more, which is not specifically limited herein.
It can be understood that if the log file size of the working log exceeds a clearable file size threshold in a preset log clearing condition, the working log is taken as a log to be cleared; it should be noted that the clearable file size threshold may be dynamically set according to actual requirements, such as 20KB, 500KB, or 800 KB.
It can also be understood that if the log generation time of the working log is within the cleanable time period in the preset log cleaning condition, the working log is taken as the log to be cleaned. It should be noted that the clearable time period is pre-configured in the preset log clearing condition. In the embodiment of the present invention, the number of the clearable time periods may be one, two, or more than two. If the number of the cleanable time periods is multiple, the interval duration of each cleanable time period may be the same or different. In other words, in the case where a plurality of purgeable periods are included in the preset log purge condition, each of the purgeable periods is set independently of each other. Exemplary, the cleanable time period is 9.
As another optional implementation manner in the embodiment of the present invention, for each work log, if at least two of the log type, the log file size, and the log generation time of the work log satisfy a clearable type, a clearable file size threshold, and a clearable time period corresponding to preset log clearing conditions, the work log may be used as a to-be-cleared log of the swap station platform.
For example, the obtaining of each work log generated by the power swapping station platform includes: and collecting all working logs generated by the power station changing platform through a pre-deployed distributed publishing and subscribing message system. The distributed publishing and subscribing message system (Kafka) can be a system which is deployed in advance and used for collecting work logs generated by the power station swapping platform. In the embodiment of the invention, the distributed issuing and subscribing message system is adopted to collect the working logs, so that the working logs generated by the power station changing platform can be acquired in time, and the working logs can be processed more quickly and effectively.
On this basis, before responding to the log clearing instruction for the power swapping station platform, the method further comprises: and receiving a log clearing instruction aiming at the power change station platform based on the distributed publishing and subscribing message system. In other words, a log clearing instruction for the power swapping station platform is received through a distributed publish-subscribe message system.
And S120, determining a storage space for storing the log to be cleared.
The storage space may be understood as a memory space for storing the log to be cleared. In the embodiment of the invention, the log to be cleared corresponds to the storage space one by one. The space size of the storage space corresponding to each log to be cleared can be the same or different.
Specifically, after determining the log to be cleared, a storage space for storing the log to be cleared may be determined. Optionally, the determining a storage space for storing the to-be-cleared log includes: and determining the space address of the log to be cleared, and taking the space pointed by the space address as a storage space for storing the log to be cleared. It will be appreciated that the spatial addresses may be memory addresses.
S130, clearing the log to be cleared in the storage space by executing the predefined log clearing script, and releasing the storage space.
The log clearing script can be a predefined script for clearing the log. It should be noted that the computer program language of the log clearing script may be set according to actual requirements, and is not specifically limited herein, for example, JAVA, C # or the like.
In the embodiment of the invention, the clearing of the log to be cleared in the storage space by executing the predefined log clearing script comprises the steps of loading the predefined log clearing script and transmitting the space address of the log to be cleared to the entry parameter of the log clearing script; and clearing the log to be cleared in the storage space by executing the log clearing script with the parameter transmission completed.
Specifically, after the spatial address of the log to be cleared is determined, a predefined log clearing script may be loaded. After the log clearing script is loaded, the space address may be transmitted to an entry parameter of the log clearing script, that is, the space address may be transmitted to a form parameter of the log clearing script as an actual parameter. After the parameter transmission is completed, the log to be cleared in the storage space can be cleared by executing the log clearing script with the completed parameter transmission.
In the embodiment of the invention, the releasing the storage space comprises releasing the storage space in a space resetting mode. The method has the advantages that the to-be-cleared logs in the power swapping platform can be completely cleared, so that the problem of space waste caused by clearing data can be effectively solved, and the utilization rate of the memory space is further improved.
According to the technical scheme of the embodiment of the invention, the log clearing instruction aiming at the power swapping station platform is received. And after receiving a log clearing instruction, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared. In the embodiment of the invention, the storage space for storing the log to be cleared is accurately positioned, so that the log to be cleared stored in the storage space can be cleared more quickly in the follow-up process. And clearing the log to be cleared in the storage space by executing a predefined log clearing script, and releasing the storage space. The technical scheme of the embodiment of the invention solves the problems of time consumption and low efficiency of log clearing in the prior art, reduces the time consumption of log clearing and further improves the efficiency of log clearing.
Example two
Fig. 2 is a schematic structural diagram of a log clearing apparatus according to a second embodiment of the present invention. As shown in fig. 2, the apparatus includes: a memory determination module 210 and a memory release module 220.
The storage space determining module 210 is configured to determine, in response to a log clearing instruction for a power swapping station platform, a to-be-cleared log in the power swapping station platform, and determine a storage space for storing the to-be-cleared log;
the storage space releasing module 220 is configured to clear the log to be cleared in the storage space by executing a predefined log clearing script, and release the storage space.
According to the technical scheme of the embodiment of the invention, the log clearing instruction aiming at the power swapping station platform is received. And after receiving a log clearing instruction, determining a log to be cleared in the power conversion station platform, and determining a storage space for storing the log to be cleared. In the embodiment of the invention, the storage space for storing the log to be cleared is accurately positioned, so that the log to be cleared stored in the storage space can be cleared more quickly in the follow-up process. And clearing the log to be cleared in the storage space and releasing the storage space by executing a predefined log clearing script. The technical scheme of the embodiment of the invention solves the problems of time consumption and low efficiency of log clearing in the prior art, reduces the time consumption of log clearing and further improves the efficiency of log clearing.
Optionally, the storage space determining module 210 includes: a storage space determination unit for:
and determining the space address of the log to be cleared, and taking the space pointed by the space address as a storage space for storing the log to be cleared.
Optionally, the storage space releasing module 220 includes: a log clearing unit to:
loading a predefined log clearing script, and transmitting the space address of the log to be cleared to an entry parameter of the log clearing script; and clearing the log to be cleared in the storage space by executing the log clearing script with the parameter transmission completed.
Optionally, the storage space releasing module 220 includes: a storage space releasing unit for:
and releasing the storage space in a space resetting mode.
Optionally, the storage space determining module 210 includes: a to-be-cleared log determination unit configured to:
acquiring all work logs generated by the power station swapping platform; and for each working log, if the working log meets a preset log clearing condition, taking the working log as a log to be cleared in the power station changing platform.
Optionally, the to-be-cleared log determining unit includes: a work log obtaining subunit configured to:
and collecting all working logs generated by the power station changing platform through a pre-deployed distributed publishing and subscribing message system.
Optionally, the device further comprises an instruction receiving module, configured to receive a log clearing instruction for the power swapping station platform based on the distributed publish-subscribe message system.
The log clearing device provided by the embodiment of the invention can execute the log clearing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the log clearing device are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.
EXAMPLE III
FIG. 3 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 may also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the log purge method.
In some embodiments, the log purging method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the log purging method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the log purging method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A log purging method, comprising:
responding to a log clearing instruction aiming at a power swapping station platform, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared;
and clearing the log to be cleared in the storage space by executing a predefined log clearing script, and releasing the storage space.
2. The method of claim 1, wherein the determining a storage space for storing the log to be cleared comprises:
and determining the space address of the log to be cleared, and taking the space pointed by the space address as a storage space for storing the log to be cleared.
3. The method of claim 2, wherein clearing the to-be-cleared log in the storage space by executing a predefined log clearing script comprises:
loading a predefined log clearing script, and transmitting the space address of the log to be cleared to an entry parameter of the log clearing script;
and clearing the log to be cleared in the storage space by executing the log clearing script with the parameter transmission completed.
4. The method of claim 1, wherein the freeing the storage space comprises:
and releasing the storage space in a space resetting mode.
5. The method of claim 1, wherein the determining a log to be cleared in the power swapping station platform comprises:
acquiring all work logs generated by the power station swapping platform;
and for each working log, if the working log meets a preset log clearing condition, taking the working log as a log to be cleared in the power change station platform.
6. The method of claim 5, wherein the obtaining the work logs generated by the power swapping station platform comprises:
and collecting all working logs generated by the power station changing platform through a pre-deployed distributed publishing and subscribing message system.
7. The method of claim 6, further comprising:
and receiving a log clearing instruction aiming at the power change station platform based on the distributed publishing and subscribing message system.
8. A log purging apparatus, comprising:
the storage space determining module is used for responding to a log clearing instruction aiming at a power swapping station platform, determining a log to be cleared in the power swapping station platform, and determining a storage space for storing the log to be cleared;
and the storage space releasing module is used for clearing the log to be cleared in the storage space and releasing the storage space by executing a predefined log clearing script.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the log purging method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a processor, when executed, to implement the log purging method of any one of claims 1-7.
CN202211160487.0A 2022-09-22 2022-09-22 Log clearing method and device, electronic equipment and storage medium Pending CN115495016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211160487.0A CN115495016A (en) 2022-09-22 2022-09-22 Log clearing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211160487.0A CN115495016A (en) 2022-09-22 2022-09-22 Log clearing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115495016A true CN115495016A (en) 2022-12-20

Family

ID=84470008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211160487.0A Pending CN115495016A (en) 2022-09-22 2022-09-22 Log clearing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115495016A (en)

Similar Documents

Publication Publication Date Title
EP4113299A2 (en) Task processing method and device, and electronic device
CN114936173B (en) Read-write method, device, equipment and storage medium of eMMC device
CN113468021B (en) Method, device, equipment and storage medium for monitoring performance data
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN115718732A (en) Disk file management method, device, equipment and storage medium
CN115495016A (en) Log clearing method and device, electronic equipment and storage medium
CN115617549A (en) Thread decoupling method and device, electronic equipment and storage medium
CN115438007A (en) File merging method and device, electronic equipment and medium
CN114564149A (en) Data storage method, device, equipment and storage medium
CN117076185B (en) Server inspection method, device, equipment and medium
CN116719621B (en) Data write-back method, device, equipment and medium for mass tasks
CN115221216A (en) Data processing method and device, electronic equipment and storage medium
CN117632027A (en) Disk space processing method, device, equipment and storage medium
CN115955189A (en) Method, device, equipment and medium for detecting power generation abnormity
CN115904550A (en) Service request processing method and device, electronic equipment and storage medium
CN114706578A (en) Data processing method, device, equipment and medium
CN115269055A (en) Nginx request data acquisition method, device, equipment and storage medium
CN115730000A (en) Medical data integration method, device, equipment and medium based on data lake
CN117081939A (en) Traffic data processing method, device, equipment and storage medium
CN115801718A (en) Message processing method and device, electronic equipment and message processing system
CN115190097A (en) Message pushing method, device, equipment and storage medium
CN115357358A (en) Radio data processing method, device, equipment and storage medium
CN115455060A (en) Data processing method, device, equipment and medium
CN117318670A (en) Data processing method, system, device, equipment and medium of multichannel filter
CN116661960A (en) Batch task processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination