CN110347995B - File saving method, device, equipment and storage medium - Google Patents

File saving method, device, equipment and storage medium Download PDF

Info

Publication number
CN110347995B
CN110347995B CN201910630692.0A CN201910630692A CN110347995B CN 110347995 B CN110347995 B CN 110347995B CN 201910630692 A CN201910630692 A CN 201910630692A CN 110347995 B CN110347995 B CN 110347995B
Authority
CN
China
Prior art keywords
application program
editing
shortcut key
target
window
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.)
Active
Application number
CN201910630692.0A
Other languages
Chinese (zh)
Other versions
CN110347995A (en
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.)
Suzhou Yige Network Technology Co ltd
Original Assignee
Suzhou Yige Network Technology 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 Suzhou Yige Network Technology Co ltd filed Critical Suzhou Yige Network Technology Co ltd
Priority to CN201910630692.0A priority Critical patent/CN110347995B/en
Publication of CN110347995A publication Critical patent/CN110347995A/en
Application granted granted Critical
Publication of CN110347995B publication Critical patent/CN110347995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images

Abstract

The embodiment of the invention discloses a file saving method, a file saving device, file saving equipment and a storage medium. The file saving method comprises the following steps: when the preset time of the timer is reached, performing screen capture on the desktop display content to obtain a screen image; carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program; if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and the stored shortcut key; and executing the operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window. According to the technical scheme of the embodiment of the invention, the editing content in the preset type application is stored at regular time by identifying the activity state of the preset type application program and correspondingly storing the shortcut key.

Description

File saving method, device, equipment and storage medium
Technical Field
The present invention relates to computer technologies, and in particular, to a file saving method, an apparatus, a device, and a storage medium.
Background
At present, with the continuous development of science and technology, computers become indispensable equipment in people's daily life, and great convenience is brought to people's work and life.
However, in the use process of the computer, the situation that the application program suddenly loses response and then flashes or the computer suddenly loses power and shuts down often occurs, so that the important files being edited are not saved, and the working efficiency of people is greatly influenced.
In the prior art, some applications such as Office and the like can automatically set an automatic saving period, but the automatic saving period is only limited to a series of applications contained in Office, and the automatic saving period cannot automatically save the contents of all applications which a user needs to automatically save at regular time; in addition, a method for realizing timed storage by regularly acquiring the content being edited by the user and caching the content in a temporary cache area also appears in the prior art, the method can realize the timed storage of the content edited by the user, but in order to acquire the edited content in the document by the user, an interface for automatically storing an application program and the document needs to be opened, which belongs to an invasive operation and is easy to cause information security problems.
Disclosure of Invention
The embodiment of the invention provides a file saving method, a file saving device, equipment and a storage medium, which realize the timed saving of edited contents in preset type application by identifying the activity state of a preset type application program and correspondingly saving shortcut keys.
In a first aspect, an embodiment of the present invention provides a file saving method, where the method includes:
when the preset time of the timer is reached, performing screen capture on the desktop display content to obtain a screen image;
carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program;
if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and the stored shortcut key;
and executing the operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window.
In a second aspect, an embodiment of the present invention further provides a file saving apparatus, where the apparatus includes:
the screen image acquisition module is used for carrying out screen capture on the desktop display content when the preset time of the timer is reached to acquire a screen image;
the active state detection module is used for carrying out image recognition on the screen image and detecting the active state of an editing window of at least one editing application program;
the target shortcut key acquisition module is used for acquiring a target shortcut key corresponding to a target editing application program according to a mapping relation between the type of a prestored application program and a stored shortcut key if the editing window of the target editing application program is detected to be in an active state;
and the editing content storage module is used for executing the operation of simulating the user to press the target shortcut key so as to store the editing content in the editing window.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory 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 file saving method provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the file saving method provided in any embodiment of the present invention.
The technical proposal of the embodiment of the invention obtains the screen image by screenshot the desktop display content when the preset time of the timer is reached, and performing image recognition on the screen image, detecting the active state of an editing window of at least one editing application program, if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to the mapping relation between the type of the prestored application program and the stored shortcut key, and finally executing the operation of simulating the user to press the target shortcut key, the edited content in the editing window is stored, the interface between the editing application and the third party application is not required to be opened, the effect of regularly saving the edited content in the preset type application can be realized, and the safety of the edited information is improved.
Drawings
FIG. 1 is a flowchart of a file saving method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a file saving method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a file saving method according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a file saving apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a file saving method in an embodiment of the present invention, where the technical solution of this embodiment is suitable for a case where a mapping relationship between a type of an application program and a shortcut key is pre-established, and the method may be executed by a file saving device, and the file saving device may be implemented by software and/or hardware, and may be integrated in various general-purpose computer devices, and specifically includes the following steps:
and 110, when the preset time of the timer is reached, carrying out screenshot on the desktop display content to obtain a screen image.
In this embodiment, the user is required to determine the interval time for automatic saving in advance according to actual requirements, start the timer after setting the interval time as the countdown time of the timer, and capture the current desktop content when the timer reaches the preset time, so as to obtain all the active windows included in the current screen. Illustratively, if it is determined that the preset edited document needs to be saved for 10 minutes once according to actual requirements, the countdown of the timer is set to 10 minutes, and each time the countdown of the timer is 0, the screenshot operation is executed.
And 120, carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program.
In this embodiment, an editing window of an editing application program included in the current screen is obtained by performing image recognition on the captured screen image, and the application program type of the current window is recognized through the editing window, so as to further determine whether the application program included in the current screen belongs to a preset editing application program. The preset editing application program is an application which is specified by a user in advance and needs to be automatically saved at regular time by means of a file saving function.
For example, when an application icon with a W-word shape corresponding to a word is identified from the edit window, the icon is matched with a pre-stored icon, so that the application type currently in an edit state is determined to be a word type.
Step 130, if it is detected that the editing window of the target editing application program is in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and the stored shortcut key.
In this embodiment, before the file saving function is started, the application program to be automatically saved and the corresponding saving shortcut key are saved correspondingly, and if the application program type in the editing state identified from the screen image belongs to the application program of the pre-stored specified type, the saving shortcut key matched with the current application program is queried from the mapping relationship file between the pre-stored application program type and the saving shortcut key. The saving shortcut key corresponding to the application program may be a default Ctrl + S, or may be a saving shortcut key that is set by the user and is only for a certain application.
And step 140, executing an operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window.
In this embodiment, after the save shortcut key corresponding to the application program currently in the editing state is queried, the operation of pressing the target shortcut key by the user is simulated, so that the edited content in the editing window is saved. Illustratively, the operation of simulating the user to press Ctrl + S may be realized by calling a specified function, so as to save the edited content in the text document.
The technical proposal of the embodiment of the invention obtains the screen image by screenshot the desktop display content when the preset time of the timer is reached, and performing image recognition on the screen image, detecting the active state of an editing window of at least one editing application program, if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to the mapping relation between the type of the prestored application program and the stored shortcut key, and finally executing the operation of simulating the user to press the target shortcut key, the edited content in the editing window is stored, the interface between the editing application and the third party application is not required to be opened, the effect of automatically saving the editing content in the editing window of the preset type application at regular time is achieved, and the safety of the editing information is improved.
Example two
Fig. 2 is a flowchart of a file saving method according to a second embodiment of the present invention, which is further detailed based on the above embodiments and provides specific steps of performing image recognition on the screen image, detecting an active state of an editing window of at least one editing application, and simulating a user pressing a screen capture and saving a shortcut key operation. A file saving method provided in the second embodiment of the present invention is described below with reference to fig. 2, which includes the following steps:
and step 210, when the preset time of the timer is reached, simulating the user to press a screen capture key by calling an API (application program interface) provided by JAVA Robot and used for simulating the user to press a physical key to perform screen capture on the desktop display content.
The JAVA Robot refers to a Robot class provided in JAVA, and calls an API (application program interface) provided by the Robot class and simulating the user to press physical keys in a program, so that the function of simulating the user to operate a keyboard can be realized.
In this embodiment, after the time set by the timer is reached, an API interface provided by a Robot class and used for simulating a user to press a physical key can be called, so as to realize a function of simulating the user to press a preset screenshot shortcut key, and complete screenshot of the current screen. Illustratively, the preset program calls a Robot class during running, and the current screen image can be intercepted by simulating that a user presses a default screen capture shortcut key Ctrl + PrintScreen.
Step 220, identifying at least one active window in the screen image, and capturing a partial image corresponding to each active window in the screen image.
In this embodiment, in the use process of a daily computer, a user often opens the editing windows of multiple application programs at the same time, and therefore the editing windows of multiple application programs often included in the screen image captured in step 210 need to perform image recognition on the captured screen image, identify all active windows included in the screen, and further capture a screen partial image including each active window. Illustratively, the editing window of a text document and the editing window of a word document in the current computer screen are determined through image recognition, and two partial images containing the two editing windows are respectively cut out from the screen image.
And step 230, identifying at least one application icon matched with the editing application program in a set area of the upper edge in the local image.
In this embodiment, after a local image including only one editing window is acquired, an application icon corresponding to a current application program included in the editing window is further acquired in a set area at an upper edge in the local image, and for example, a corresponding icon is acquired at an upper left corner of a taskbar of the local image.
And 240, if the application icon matched with the target editing application program is determined to be identified, determining that the editing window of the target editing application program is detected to be in an active state.
In this embodiment, when the application icon identified from the local image is matched with an icon in a preset target editing application program, it is determined that the editing window of the application program that is successfully matched is in an active state. Illustratively, the preset target editing application includes a text document, a word document, a MathType formula editor and other application programs that need to store editing contents at regular time, and when an application icon identified from the local image is the same as an icon corresponding to one of the application programs (for example, the word document) included in the preset target editing application program, it is determined that an editing window of the word document is in an active state when it is detected that the editing window of the word document is in the active state.
And step 250, if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to the mapping relation between the type of the prestored application program and the saved shortcut key.
And step 260, simulating the user to press the target shortcut key by calling an API (application programming interface) provided by the JAVA Robot and used for simulating the user to press the physical key operation.
In this embodiment, similar to the operation of simulating the user to press the screen capture shortcut key, after the save shortcut key corresponding to the editing application program to be saved is obtained, the JAVA Robot is called again, so that the effect of simulating the user to press the corresponding save shortcut key is achieved. Illustratively, if the application program to be saved currently is of a word type and the corresponding save shortcut key is Ctrl + S, the user is simulated to press the shortcut key, so as to achieve the effect of automatic saving.
According to the technical scheme of the embodiment, screenshot is performed by simulating a user to press a screenshot shortcut key, application icons of all active windows are identified from a captured screen image, when the application icon matched with a target editing application program is identified, it is determined that an editing window of the target editing application program is detected to be in an active state, an API (application programming interface) provided by JAVARobot and used for simulating the user to press a physical key is called, and the storage shortcut key is simulated to be pressed by the user, so that on one hand, content in the target editing application is stored at regular time, the situation that the editing content which is not stored in time is lost due to the fact that the application program loses response or equipment is suddenly powered off is avoided, on the other hand, automatic storage is performed by simulating the user to press the storage shortcut key without opening an interface between the editing application program and a third-party application program, the safety of the editing information is improved.
EXAMPLE III
Fig. 3 is a flowchart of a file saving method in a third embodiment of the present invention, and in this embodiment, further details are provided on the basis of the above embodiment, which provide specific steps before screenshot of desktop display contents and screen image acquisition are performed when the preset time of the timer is reached, and after an operation of simulating a user to press the target shortcut key is performed. A file saving method in a third embodiment of the present invention is described below with reference to fig. 3, which further includes the following steps:
step 310, responding to the operation of opening at least one editing application program, and starting a file saving function;
or responding to the system starting operation and starting the file saving function.
In this embodiment, the file saving function may be set to be started with the start of the operating system, or may be set to be started with the start of the editing application by the user. Illustratively, it is started with the computer operating system being started, or at the user starting an editing-type application (e.g., a text document).
Optionally, the file saving function is implemented by a desktop tool written based on Swing.
Where Swing is part of a JAVA base class, Swing includes graphical user interface devices such as: text boxes, buttons, separator panes, and tables.
In the above optional embodiment, the file saving function is implemented by a desktop tool written based on Swing, and a user may set an application program to be saved at regular time, a save shortcut key corresponding to the application program, a countdown time of a timer, and the like in the desktop tool.
And 320, when the preset time of the timer is reached, performing screenshot on the desktop display content to obtain a screen image.
Step 330, performing image recognition on the screen image, and detecting the active state of the editing window of at least one editing application program.
And 340, if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to the mapping relation between the type of the prestored application program and the saved shortcut key.
And 350, executing the operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window.
And step 360, after the countdown time of the timer is set to be the preset time, returning to execute, and when the preset time of the timer is reached, performing screenshot on the desktop display content to obtain a screen image until the condition of finishing storing is met.
In this embodiment, after the simulated user presses the save shortcut key to complete a save operation, the timer is restarted to count down to a preset time (where the preset time is set according to the actual application and the interval time at which the application program needs to implement automatic save), and when the preset time of the timer is reached, the operations of screenshot on the desktop display content and automatic save are repeated until the save end condition is met. Illustratively, the end condition may be that the user closes the editing class application.
The technical scheme of the embodiment is that in response to the operation of starting at least one editing application program or the system starting operation, after the file saving function is started, a timer is started for timing, when the preset time of the timer is reached, screen capture is carried out on the display content of a desktop, the activity state of an editing window of the editing application program is detected by carrying out image recognition on the captured screen image, if the editing window of the target editing application program is detected to be in the activity state, the operation of simulating a user to press a target shortcut key corresponding to the target editing application program is executed, the timer time is reset after the shortcut key is pressed in a simulation mode, the process is repeated until the end saving condition is met, the file saving function is started along with the running of the editing application program or the system, and the file saving function is automatically saved by the timing of the target editing application program, the situation that the edited content is lost due to unexpected situations such as sudden power failure of the equipment is avoided.
Example four
Fig. 4 is a schematic structural diagram of a file saving device according to a fourth embodiment of the present invention, where the file saving device includes: a screen image acquisition module 410, an activity state detection module 420, a target shortcut key acquisition module 430 and an edited content saving module 440.
The screen image acquisition module 410 is configured to perform screenshot on desktop display content when the preset time of the timer is reached, and acquire a screen image;
an active state detection module 420, configured to perform image recognition on the screen image, and detect an active state of an editing window of at least one editing application;
the target shortcut key obtaining module 430 is configured to, if it is detected that an editing window of a target editing application program is in an active state, obtain a target shortcut key corresponding to the target editing application program according to a mapping relationship between a type of a prestored application program and a stored shortcut key;
and the edited content saving module 440 is configured to execute an operation of simulating that the user presses the target shortcut key, so as to save the edited content in the editing window.
The technical proposal of the embodiment of the invention obtains the screen image by screenshot the desktop display content when the preset time of the timer is reached, and performing image recognition on the screen image, detecting the active state of an editing window of at least one editing application program, if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to the mapping relation between the type of the prestored application program and the stored shortcut key, and finally executing the operation of simulating the user to press the target shortcut key, the edited content in the editing window is stored, the interface between the editing application and the third party application is not required to be opened, the effect of regularly saving the edited content in the preset type application can be realized, and the safety of the edited information is improved.
Optionally, the activity status detecting module 420 includes:
the window identification unit is used for identifying at least one movable window in the screen image and intercepting a local image respectively corresponding to each movable window in the screen image;
the application icon identification unit is used for identifying at least one application icon matched with an editing application program in a set area of the upper edge in the local image;
and the active state determining unit is used for determining that the editing window of the target editing application program is detected to be in an active state if the application icon matched with the target editing application program is determined to be identified.
Optionally, the edit content saving module 440 is specifically configured to:
and simulating the user to press the target shortcut key by calling an API (application programming interface) provided by the JAVA Robot and used for simulating the user to press a physical key.
Optionally, the screen image obtaining module 410 is specifically configured to:
when the preset time of the timer is reached, an API (application program interface) provided by a JAVA Robot and used for simulating a user to press a physical key to operate is called, and the user is simulated to press a screen capture key to perform screen capture on the desktop display content.
Optionally, the file saving apparatus further includes:
the function starting module is used for carrying out screenshot on the desktop display content when the preset time of the timer is reached, responding to the operation of starting the at least one editing application program before acquiring the screen image, and starting a file storage function; or responding to the system starting operation and starting the file saving function.
Optionally, the file saving function is implemented by a desktop tool written based on Swing.
Optionally, the file saving apparatus further includes:
and the time setting module is used for setting the countdown time of the timer to the preset time after executing the operation of simulating the user to press the target shortcut key, returning to execute the operation and performing screenshot on the desktop display content when the preset time of the timer is reached to obtain the screen image until the condition of finishing the storage is met.
The file saving device provided by the embodiment of the invention can execute the file saving method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, as shown in fig. 5, the electronic device includes a processor 50 and a memory 51; the number of processors 50 in the device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50 and the memory 51 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 5.
The memory 51, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a file saving method in an embodiment of the present invention (for example, the screen image acquisition module 410, the activity state detection module 420, the target shortcut key acquisition module 430, and the edited content saving 440 in the file saving device). The processor 50 executes various functional applications of the device and data processing by executing software programs, instructions, and modules stored in the memory 51, that is, implements the above-described file saving method.
The method comprises the following steps:
when the preset time of the timer is reached, performing screen capture on the desktop display content to obtain a screen image;
carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program;
if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and the stored shortcut key;
and executing the operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
EXAMPLE six
An embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program, which when executed by a computer processor is configured to perform a file saving method, the method including:
when the preset time of the timer is reached, performing screen capture on the desktop display content to obtain a screen image;
carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program;
if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and the stored shortcut key;
and executing the operation of simulating the user to press the target shortcut key so as to store the edited content in the editing window.
Of course, the storage medium provided by the embodiment of the present invention and containing the computer-executable instructions is not limited to the method operations described above, and may also perform related operations in the file saving method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the file saving device, the units and modules included in the file saving device are only 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 present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A file saving method, comprising:
when the preset time of the timer is reached, performing screen capture on the desktop display content to obtain a screen image;
carrying out image recognition on the screen image, and detecting the activity state of an editing window of at least one editing application program;
if the editing window of the target editing application program is detected to be in an active state, acquiring a target shortcut key corresponding to the target editing application program according to a mapping relation between the type of the prestored application program and a saving shortcut key, wherein the saving shortcut key is a default saving shortcut key or a saving shortcut key which is set by a user and only aims at a specific application;
simulating the user to press the target shortcut key by calling an API (application programming interface) provided by the JAVA Robot and used for simulating the user to press a physical key to store the editing content in the editing window;
performing image recognition on the screen image, and detecting the active state of an editing window of at least one editing application program, wherein the method comprises the following steps:
identifying at least one active window in the screen image, and intercepting a partial image corresponding to each active window in the screen image;
identifying at least one application icon matched with an editing application program in a set area of an upper edge in the local image;
if the application icon matched with the target editing application program is determined to be identified, the editing window of the target editing application program is determined to be in an active state.
2. The method of claim 1, wherein the screenshot of the desktop display content when the preset time of the timer is reached to obtain a screen image comprises:
when the preset time of the timer is reached, an API (application program interface) provided by a JAVA Robot and used for simulating a user to press a physical key to operate is called, and the user is simulated to press a screen capture key to perform screen capture on the desktop display content.
3. The method according to any one of claims 1-2, wherein before the screenshot of the desktop display content when the preset time of the timer is reached and the screen image is obtained, further comprising:
responding to the operation of opening the at least one editing application program, and opening a file saving function;
or responding to the system starting operation and starting the file saving function.
4. The method of claim 3, wherein the file saving function is implemented by a desktop tool written based on Swing.
5. The method of claim 1, after performing the operation of simulating the user pressing the target shortcut key, further comprising:
and after the countdown time of the timer is set to be the preset time, returning to execute, and when the preset time of the timer is reached, carrying out screenshot on the desktop display content to obtain a screen image until the condition of finishing the storage is met.
6. A file saving apparatus, comprising:
the screen image acquisition module is used for carrying out screen capture on the desktop display content when the preset time of the timer is reached to acquire a screen image;
the active state detection module is used for carrying out image recognition on the screen image and detecting the active state of an editing window of at least one editing application program;
the target shortcut key acquisition module is used for acquiring a target shortcut key corresponding to a target editing application program according to a mapping relation between a type of a prestored application program and a saving shortcut key if an editing window of the target editing application program is detected to be in an active state, wherein the saving shortcut key is a default saving shortcut key or a saving shortcut key which is set by a user and only aims at a specific application;
the editing content storage module is used for simulating the user to press the target shortcut key by calling an API (application programming interface) provided by the JAVA Robot and used for simulating the user to press a physical key operation so as to store the editing content in the editing window;
the activity status detection module includes:
the window identification unit is used for identifying at least one movable window in the screen image and intercepting a local image respectively corresponding to each movable window in the screen image;
the application icon identification unit is used for identifying at least one application icon matched with an editing application program in a set area of the upper edge in the local image;
and the active state determining unit is used for determining that the editing window of the target editing application program is detected to be in an active state if the application icon matched with the target editing application program is determined to be identified.
7. An electronic device, characterized in that the device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the file saving method of any one of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the file saving method according to any one of claims 1 to 5.
CN201910630692.0A 2019-07-12 2019-07-12 File saving method, device, equipment and storage medium Active CN110347995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910630692.0A CN110347995B (en) 2019-07-12 2019-07-12 File saving method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910630692.0A CN110347995B (en) 2019-07-12 2019-07-12 File saving method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110347995A CN110347995A (en) 2019-10-18
CN110347995B true CN110347995B (en) 2020-09-11

Family

ID=68176005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910630692.0A Active CN110347995B (en) 2019-07-12 2019-07-12 File saving method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110347995B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126032B (en) * 2019-12-31 2023-05-23 深圳企业云科技股份有限公司 Automatic document version generation method based on intelligent prediction of editing behaviors
CN112256372B (en) * 2020-10-20 2023-12-26 北京字跳网络技术有限公司 Information processing method and device and electronic equipment
CN112860688A (en) * 2020-12-31 2021-05-28 佛山欧神诺云商科技有限公司 Time-based data storage method, terminal and storage device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462979A (en) * 2014-12-26 2015-03-25 深圳数字电视国家工程实验室股份有限公司 Automatic dynamic detection method and device of application program
CN104636445A (en) * 2015-01-16 2015-05-20 北京合辉信息技术有限公司 Screenshot image processing and grouping operation method and device
CN106164908A (en) * 2014-04-02 2016-11-23 微软技术许可有限责任公司 Modern document storing and sync status
CN106776511A (en) * 2016-11-11 2017-05-31 郑州云海信息技术有限公司 One kind editor document storage method and device
CN108416018A (en) * 2018-03-06 2018-08-17 北京百度网讯科技有限公司 Screenshotss searching method, device and intelligent terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820416A (en) * 2010-02-24 2010-09-01 上海引跑信息科技有限公司 Processing method of high-speed shared desktop in netmeeting system
CN102932456A (en) * 2012-11-02 2013-02-13 北京奇虎科技有限公司 Information interaction method and system
CN104461298B (en) * 2015-01-19 2018-05-22 中国人民解放军第三〇七医院 A kind of screenshot method and sectional drawing instrument
CN105975621B (en) * 2016-05-25 2019-12-13 北京小米移动软件有限公司 Method and device for identifying search engine in browser page

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106164908A (en) * 2014-04-02 2016-11-23 微软技术许可有限责任公司 Modern document storing and sync status
CN104462979A (en) * 2014-12-26 2015-03-25 深圳数字电视国家工程实验室股份有限公司 Automatic dynamic detection method and device of application program
CN104636445A (en) * 2015-01-16 2015-05-20 北京合辉信息技术有限公司 Screenshot image processing and grouping operation method and device
CN106776511A (en) * 2016-11-11 2017-05-31 郑州云海信息技术有限公司 One kind editor document storage method and device
CN108416018A (en) * 2018-03-06 2018-08-17 北京百度网讯科技有限公司 Screenshotss searching method, device and intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AutoSaver定时自动保存工具V3.0.2最新免费版;AutoSaver定时自动保存工具;《http://www.greenxf.com/soft/198346.html》;20180314;第1页 *

Also Published As

Publication number Publication date
CN110347995A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN110347995B (en) File saving method, device, equipment and storage medium
US10838838B2 (en) Method and apparatus for dealing with abnormality of application program and storage medium
CN105204745B (en) Screen capturing method and device for mobile terminal
CN106445292B (en) Method and system for managing application programs in different body modes
CN104536711A (en) Control method of terminal display
CN102253863A (en) Method for closing processes
CN105893127A (en) Method for starting application and terminal device
CN108228308B (en) Monitoring method and device for virtual machine
CN104572348A (en) Terminal
CN105159475A (en) Character input method and device
CN104580705A (en) Terminal
CN105205166A (en) Device and method for creating desktop folder
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN105425997B (en) A kind of user terminal restart after interface display method and user terminal
CN104679506B (en) A kind of terminal
CN112422581B (en) Webshell webpage detection method, device and equipment in JVM (Java virtual machine)
CN105389116A (en) Terminal application processing method and system for terminal device, and terminal device
CN105045458A (en) Method, device and system for rapidly recording by mobile terminal
CN108491483B (en) Method and device for remotely monitoring running state of program
US11287949B2 (en) Method and device for displaying icon
CN108984024B (en) Touch operation method and device, storage medium and electronic equipment
CN103870378A (en) Monitoring method for terminal device and terminal device
CN116361106A (en) Log processing method and device, electronic equipment and storage medium
CN105786679A (en) Automatic test monitoring system and method and mobile terminal
CN104778039A (en) Terminal

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 215000 17F, friendship time building, No. 68, Qitai Road, Suzhou Industrial Park, Suzhou area, China (Jiangsu) pilot Free Trade Zone, Suzhou, Jiangsu

Patentee after: SUZHOU YIGE NETWORK TECHNOLOGY Co.,Ltd.

Address before: Room 101, Building 22, No. 208, Tongyuan Road, Suzhou Industrial Park, Jiangsu Province 215006

Patentee before: SUZHOU YIGE NETWORK TECHNOLOGY Co.,Ltd.