CN110865857A - Screenshot method and device - Google Patents
Screenshot method and device Download PDFInfo
- Publication number
- CN110865857A CN110865857A CN201810982905.1A CN201810982905A CN110865857A CN 110865857 A CN110865857 A CN 110865857A CN 201810982905 A CN201810982905 A CN 201810982905A CN 110865857 A CN110865857 A CN 110865857A
- Authority
- CN
- China
- Prior art keywords
- screenshot
- page
- configuration
- configuration item
- executed
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 103
- 230000000694 effects Effects 0.000 claims description 90
- 230000008569 process Effects 0.000 abstract description 18
- 230000006870 function Effects 0.000 description 11
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000008901 benefit Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000013024 troubleshooting Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006854 communication Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a screenshot method and a screenshot device, relates to the technical field of picture processing, and mainly aims to solve the problem that when screenshot operation is performed on different equipment, different tools or software need to be downloaded respectively, so that the screenshot process is complicated. The method of the invention comprises the following steps: acquiring a screenshot configuration item, wherein the screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address; judging whether the screenshot configuration item needs to be executed or not; if the screenshot configuration information needs to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information; and executing screenshot operation on the screenshot page. The method and the device are used for screenshot operation.
Description
Technical Field
The invention relates to the technical field of picture processing, in particular to a screenshot method and a screenshot device.
Background
With the increasing popularity of networks, the use of smart devices has increased. In the communication process, pictures are used as a more intuitive expression form and become the main medium for people to communicate. Therefore, in the process of using the intelligent device or the computer, people pay more attention to how to intercept the interface to realize the screenshot function.
At present, in the process of screenshot operation, some screenshot tools are usually used for screenshot, and the screenshot function of the screenshot tool is used for intercepting an operation interface. However, in practical applications, when different devices are used to capture a website or a page, different capture tools need to be used for capturing the screen due to differences between the different devices, for example, the capture tools used by a computer and a smartphone when performing capture operations are different. Therefore, when the conventional screenshot mode is used for performing screenshot operation on different devices, different screenshot tools or software need to be downloaded respectively, which is complicated. Therefore, how to implement a method capable of performing screenshot on a plurality of different devices becomes a problem to be solved urgently in the domain.
Disclosure of Invention
In view of the above problems, the present invention provides a screenshot method and apparatus, and a main object of the present invention is to implement a method capable of performing screenshot on a plurality of different devices, so as to solve the problem that the screenshot process is complicated due to the fact that different tools or software need to be downloaded respectively when the screenshot operation is performed on different devices.
In order to solve the technical problem, in a first aspect, the present invention provides a screenshot method, including:
acquiring a screenshot configuration item, wherein the screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
judging whether the screenshot configuration item needs to be executed or not;
if the screenshot configuration information needs to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information;
and executing screenshot operation on the screenshot page.
Optionally, the screenshot time or the screenshot time interval is stored in the screenshot configuration item, and the determining whether the screenshot configuration item needs to be executed includes:
determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
acquiring the last adjacent screenshot moment for executing screenshot operation;
and determining whether the screenshot configuration item needs to be executed or not according to the time difference between the current time of the system and the last adjacent screenshot time and whether the screenshot time interval is reached or not.
Optionally, the screenshot configuration item is stored in a screenshot configuration list, a timing plan for scanning the screenshot configuration item is further stored in the screenshot configuration list, and the acquiring the screenshot configuration item includes:
scanning screenshot configuration items in the screenshot configuration list according to the timing plan;
and if the screenshot configuration item is scanned, acquiring the screenshot configuration item from the screenshot configuration list.
Optionally, before performing the screenshot operation on the screenshot page, the method further includes:
generating a screenshot task according to the screenshot configuration item, and adding the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the executing screenshot operation on the screenshot page comprises:
executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list; and/or the presence of a gas in the gas,
after the screenshot operation is executed, the method further comprises the following steps:
deleting the screenshot task corresponding to the screenshot operation from the screenshot task list;
and/or the presence of a gas in the gas,
judging whether the screenshot operation is successfully executed or not;
if yes, saving the picture obtained after the screenshot operation;
and if not, outputting alarm information, wherein the alarm information comprises at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
Optionally, after determining the screenshot page, the method further includes:
acquiring a display effect list, wherein the display effect list stores the corresponding page display effect of each screenshot address when the screenshot address is displayed in different display equipment;
determining a page display effect corresponding to the screenshot page from the display effect list according to the display equipment information and the screenshot address in the screenshot configuration information;
executing screenshot operation on the screenshot page, including:
and intercepting a page corresponding to the page display effect in the screenshot page.
Optionally, the screenshot configuration information further includes: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and after the page display effect corresponding to the screenshot page is determined, the method further comprises the following steps of:
determining an actual screenshot range of the screenshot operation according to the display resolution and the display size in the page display effect and the screenshot range;
the intercepting of the page corresponding to the page display effect in the screenshot page includes:
and intercepting a page which corresponds to the actual screenshot range and corresponds to the page display effect from the screenshot page.
In a second aspect, the present invention further provides a screenshot device, including:
a first obtaining unit, configured to obtain a screenshot configuration item, where the screenshot configuration item includes screenshot configuration information required when a screenshot operation is executed, and the screenshot configuration information includes: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
the first judgment unit is used for judging whether the screenshot configuration item needs to be executed or not;
the first determining unit is used for determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information if the screenshot is required to be executed;
and the execution unit is used for executing screenshot operation on the screenshot page.
Optionally, the screenshot configuration item stores a screenshot time or a screenshot time interval,
the first judgment unit includes:
the first determining module is used for determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
the first acquisition module is used for acquiring the last adjacent screenshot moment for executing screenshot operation;
and the second determination module is used for determining whether the screenshot configuration item needs to be executed or not according to whether the time interval of the screenshot is reached or not according to the time difference between the current time of the system and the last adjacent screenshot time.
Optionally, the screenshot configuration item is stored in a screenshot configuration list, a timing plan for scanning the screenshot configuration item is also stored in the screenshot configuration list, and the first obtaining unit includes:
the scanning module is used for scanning screenshot configuration items in the screenshot configuration list according to the timing plan;
and the second acquisition module is used for acquiring the screenshot configuration item from the screenshot configuration list if the screenshot configuration item is scanned.
Optionally, the apparatus further comprises:
the adding unit is used for generating a screenshot task according to the screenshot configuration item and adding the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the execution unit is further used for executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list; and/or the presence of a gas in the gas,
a deleting unit, configured to delete the screenshot task corresponding to the screenshot operation from the screenshot task list; and/or the presence of a gas in the gas,
the second judgment unit is used for judging whether the screenshot operation is successfully executed;
the storage unit is used for storing the picture obtained after the screenshot operation if the screenshot operation is judged to be successfully executed;
and the output unit is used for outputting alarm information if the screenshot operation is judged not to be successfully executed, wherein the alarm information comprises at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
Optionally, the apparatus further comprises:
the second obtaining unit is used for obtaining a display effect list, and page display effects corresponding to the screenshot addresses when the screenshot addresses are displayed in different display devices are stored in the display effect list;
a second determining unit, configured to determine, according to the display device information and the screenshot address in the screenshot configuration information, a page display effect corresponding to the screenshot page from the display effect list;
the execution unit is further configured to intercept a page corresponding to the page display effect in the screenshot page.
Optionally, the screenshot configuration information further includes: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and the device further comprises:
a third determining unit, configured to determine an actual screenshot range of the screenshot operation according to a display resolution and a display size in the page display effect and the screenshot range;
the execution unit is further specifically configured to intercept, from the screenshot page, a page corresponding to the actual screenshot range and corresponding to the page display effect.
In order to achieve the above object, according to a third aspect of the present invention, a storage medium is provided, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the above screenshot method.
In order to achieve the above object, according to a fourth aspect of the present invention, there is provided a processor for executing a program, wherein the program executes to execute the screenshot method described above.
By means of the technical scheme, the screenshot method and the screenshot device provided by the invention solve the problem that the screenshot process is complicated because different tools or software need to be downloaded respectively when the screenshot mode in the prior art is used for performing screenshot operation on different devices, and the screenshot method and the screenshot device provided by the invention determine a screenshot page by acquiring a screenshot configuration item and judging whether the screenshot configuration item needs to be executed or not, if the screenshot configuration item needs to be executed, the screenshot page is determined according to display device information and a screenshot address in the screenshot configuration information, then the screenshot operation is executed on the screenshot page, the corresponding screenshot operation can be executed through the screenshot configuration item, wherein the screenshot configuration item comprises the screenshot configuration information required by the screenshot operation, and the screenshot configuration information comprises the display device information and the screenshot address used for determining the screenshot page, so that the screenshot operation corresponding to the display device can be performed through the display device information in the configuration information, therefore, the screenshot function can be realized on various different display devices, the problem that the screenshot process is complicated due to the fact that different screenshot tools need to be downloaded for screenshot on different devices in the prior art can be solved, the screenshot device can adapt to various different display devices, and the screenshot device has good adaptability.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a screenshot method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another screenshot method provided by the embodiment of the present invention;
FIG. 3 is a block diagram illustrating components of a screenshot device provided in an embodiment of the present invention;
fig. 4 shows a block diagram of another screenshot device provided in the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to solve the problem that the screenshot process is complicated due to the fact that different tools or software need to be downloaded respectively when screenshot operations are performed on different devices, an embodiment of the present invention provides a screenshot method, as shown in fig. 1, the method includes:
101. and acquiring screenshot configuration items.
The screenshot configuration item includes screenshot configuration information required when screenshot operation is executed, and the screenshot configuration information may include: and the method is used for determining the display equipment information and the screenshot address of the screenshot page.
In the embodiment of the present invention, the screenshot configuration item may be understood as a screenshot item set by a user and including configuration information required for multiple screenshots, where the screenshot configuration item may be set by the user, where the screenshot configuration item may be obtained by the user from a screenshot configuration list, and the screenshot configuration list may be generated by a screenshot system after the user sets different screenshot configuration items. In the embodiment of the present invention, each screenshot configuration item includes screenshot configuration information required for executing a screenshot operation, and the screenshot configuration information includes a screenshot address used for determining a screenshot page corresponding to the screenshot operation and display device information on which device the screenshot operation is executed.
In addition, when the screenshot configuration item is acquired through the screenshot configuration list, the corresponding acquisition mode can be selected based on the generation mode of the configuration list, for example, when the screenshot configuration list is generated after being set by a user, the screenshot configuration list generated after being set by the user can be acquired through a preset interface; and when the screenshot configuration list is generated by the screenshot system after the user sets the screenshot configuration item, inquiring from the local system to obtain the screenshot configuration list stored in the system.
In addition, in the embodiment of the present invention, the screenshot configuration information included in the screenshot configuration item may further include other screenshot parameters or configurations set by the user during screenshot, for example, different screenshot parameters such as a screenshot size during screenshot, a screenshot size, a path position required to be saved after screenshot, and the like. Here, the configuration content, the type, and the number included in the configuration information in the screenshot configuration item are not specifically limited, and may be selected and set according to the actual situation.
102. And judging whether the screenshot configuration item needs to be executed or not.
After the screenshot configuration item is obtained in step 101, the screenshot configuration item may be judged to determine whether it needs to be executed.
Whether the screenshot configuration item needs to be executed or not can be judged according to whether the current time of the system reaches the screenshot moment or not, or whether the time difference between two screenshots reaches the screenshot time interval or not.
Of course, the specific manner for determining whether the screenshot configuration item needs to be executed in this step may include, but is not limited to, the above method, and the determination manner meeting the actual need may also be selected according to the actual situation, and is not specifically limited herein.
103. And if the screenshot is required to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information.
After the determination in the foregoing step 102, if it is determined that the screenshot configuration item needs to be executed, it indicates that a screenshot operation that needs to be executed currently exists, and thus, what kind of device the page corresponding to the screenshot address is displayed on may be determined according to the display device information in the screenshot configuration item, and the content and the layout manners displayed on different platforms or devices based on the same web page may be different.
104. And executing screenshot operation on the screenshot page.
After the screenshot page corresponding to the screenshot operation to be executed is determined in step 103, the screenshot operation may be executed on the screenshot page according to the method described in this step. Specifically, in this step, since the screenshot configuration item includes screenshot configuration information required for screenshot, the corresponding screenshot operation can be executed according to the display device information and the screenshot address included in the screenshot configuration information. For example, when the configuration information includes a website address of a screenshot target website, display device information, and a picture storage location after screenshot, according to the method in this step, it may be determined that the display device loads the website content of the target website corresponding to the screenshot address according to the screenshot address and the display device information, then the picture is intercepted in the website, and the picture is stored in the storage location, thereby completing the screenshot operation corresponding to the screenshot configuration item. In the embodiment of the present invention, the specific execution manner of the screenshot operation is not specifically limited herein, and a corresponding screenshot manner may be selected according to an actual situation, and certainly, when the screenshot operation is specifically executed, it is required to ensure that the executed screenshot operation corresponds to the screenshot configuration information in the screenshot configuration item.
The screenshot method provided by the embodiment of the invention solves the problem that the screenshot process is complicated because different tools or software needs to be downloaded respectively when the screenshot mode in the prior art is used for performing screenshot operation on different devices, determines a screenshot page according to display device information and a screenshot address in screenshot configuration information if the screenshot configuration item needs to be executed, and performs screenshot operation on the screenshot page, wherein the screenshot configuration item comprises screenshot configuration information required by the screenshot operation and the screenshot configuration information comprises the display device information and the screenshot address used for determining the screenshot page, therefore, the screenshot function can be realized on various different types of display equipment, the problem that the screenshot process is complicated due to the fact that different screenshot tools need to be downloaded for screenshot on different existing different equipment can be solved, the screenshot device can adapt to various different display equipment, and the screenshot device has good adaptability.
Further, as a refinement and an extension of the embodiment shown in fig. 1, an embodiment of the present invention further provides another screenshot method, as shown in fig. 2, which includes the specific steps of:
201. and acquiring screenshot configuration items.
The screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises display equipment information and a screenshot address used for determining a screenshot page; further, the screenshot configuration item stores screenshot time or screenshot time interval; the screenshot configuration information further comprises a screenshot range, and the screenshot range is at least part of the screenshot page.
Further, in the embodiment of the present invention, the screenshot configuration item may be stored in a screenshot configuration list, and a timing plan for scanning the screenshot configuration item may also be stored in the screenshot configuration list.
When the screenshot configuration item is stored in the screenshot configuration list, the step may specifically be: firstly, screenshot configuration items in the screenshot configuration list are scanned according to the timing plan. And if the screenshot configuration item is scanned, acquiring the screenshot configuration item from the screenshot configuration list.
In the embodiment of the present invention, the timing plan may be made and issued by a user, and the timing plan may include a period for acquiring the screenshot configuration list, so that the screenshot system can periodically scan screenshot configuration items according to the timing plan. When the method in this step is specifically executed, the timing plan formulated by the user may be specifically received through a first preset interface. Of course, in the embodiment of the present invention, the timing plan may be performed according to other manners, which may be determined according to actual situations, and is not limited in this respect.
In this embodiment of the present invention, the screenshot configuration item may be specified by a user, and the screenshot configuration item is received through a preset second preset interface. The configuration information in the screenshot configuration item includes a screenshot address which may be a Uniform Resource Locator (URL), and according to the URL, which page or website the screenshot operation corresponding to the screenshot configuration item is performed on can be determined in a subsequent screenshot operation. In addition, in the screenshot configuration information, the display device information is used for determining on which device the website or page to be screenshot is displayed; the screenshot time and the screenshot time interval are used for determining whether the screenshot configuration item needs to be executed at the current time; the screenshot range is used to determine the size of a page displayed in the display device of the picture to be captured, where the screenshot range may be all of the page displayed in the display device or may be a part of the page, and is not limited herein and may be determined according to actual settings of a user.
In the embodiment of the present invention, the display device information may be set by a user in specifying a screenshot configuration item, or may be parsed from device information in the configuration information when the user executes the screenshot configuration item. Here, the manner of acquiring the display device information is not specifically limited herein, and may be determined according to actual situations. In addition, in the embodiment of the present invention, the screenshot configuration information of the screenshot configuration item includes, but is not limited to, the multiple parameters, and may also include related parameters such as the resolution of the screenshot picture, the quality of the screenshot picture, and the like, and specifically, the screenshot configuration information may be selected according to actual needs.
And scanning the screenshot configuration items in the screenshot configuration list according to the timing plan, and when the screenshot configuration items are scanned, acquiring the screenshot configuration items from the screenshot configuration list, and when the screenshot configuration list also stores the timing plan for scanning the screenshot configuration items, the screenshot method provided by the embodiment of the invention can periodically acquire the configuration items according to the timing plan set in the timing plan, so that the subsequent screenshot method can be periodically executed in a certain period, and the automation and the controllability of screenshot operation are ensured.
202. And judging whether the screenshot configuration item needs to be executed or not.
The screenshot configuration information based on the screenshot configuration item in the foregoing step 201 may be a screenshot time or a screenshot time interval.
Therefore, based on two different setting manners of the screenshot time, the step of determining whether the screenshot configuration item needs to be executed may specifically include: when the screenshot configuration item includes the screenshot time, the step can determine whether the screenshot configuration item needs to be executed according to whether the current time of the system reaches the screenshot time.
When the screenshot configuration item includes a screenshot time interval, the step may first obtain a previous adjacent screenshot time for executing the screenshot operation, and then determine whether the screenshot configuration item needs to be executed according to whether a time difference between the current time of the system and the previous adjacent screenshot time reaches the screenshot time interval.
Therefore, whether the screenshot configuration item needs to be executed or not is determined according to whether the current time of the system reaches the screenshot time or not, and whether the screenshot configuration item needs to be executed or not can be judged according to comparison between the screenshot time and the current time when the screenshot configuration information in the screenshot configuration item is the screenshot time, so that the screenshot configuration item can be executed in time. In addition, whether the screenshot configuration item needs to be executed or not is determined by acquiring the last adjacent screenshot time for executing the screenshot operation and according to whether the time difference between the current time of the system and the last adjacent screenshot time reaches the screenshot time interval or not, and whether the screenshot configuration item needs to be executed or not can be ensured by judging whether the screenshot item needs to be executed or not when the screenshot configuration information in the screenshot configuration item includes the screenshot time interval.
203. And if the screenshot is required to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information.
When it is determined in step 202 that the screenshot configuration item needs to be executed, in this step, a page displayed in the display device by a page corresponding to the screenshot address needs to be determined according to the display device and the screenshot address, that is, the screenshot page according to the embodiment of the present invention. Specifically, the method in this step is consistent with the description in step 103 in the foregoing embodiment, and is not repeated here.
204. And acquiring a display effect list.
After the screenshot interface is determined in step 203, the display contents and effects set on different devices of the same website or page may be different based on the supportable resolutions and screen sizes of different display devices, and generally, in order to enable users using different display devices to have better user experience. For example: the page effect displayed by the kyoton on the PC side and the smart phone is different. Because the displayed effects of the same website or page on different devices may be completely different, in order to ensure the accuracy of the images in the subsequent screenshot, in the embodiment of the present invention, the display effect list may be obtained according to the method described in this step. The display effect list stores page display effects corresponding to the screenshot addresses when the screenshot addresses are displayed in different display devices, wherein the page display effects comprise display resolution and display size.
205. And determining a page display effect corresponding to the screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information.
Based on the display effect list including the display effects corresponding to the different display devices and the screenshot addresses, in this step, the corresponding display effect can be queried in the display effect list according to the display device information and the screenshot addresses.
Therefore, the display effect corresponding to the screenshot page is determined in the display effect list through the display device information and the screenshot address, the specific display effect of the webpage corresponding to the screenshot address when the webpage is displayed by the display device can be determined, and then the information such as the size and the resolution ratio which can be displayed by the webpage can be determined, so that the picture obtained by screenshot operation can better meet the actual requirement.
206. And determining the actual screenshot range of the screenshot operation according to the display size in the page display effect and the screenshot range.
After the display effect of the screenshot page is determined in step 205, an access range corresponding to an actual screenshot operation, that is, an actual screenshot range according to the embodiment of the present invention, may be determined according to the display size in the display effect and the screenshot range in the screenshot configuration item. For example, when the display size is 480mm 320mm, and the screen capture range is 200mm, then the actual screen capture range may be determined to be 200 mm.
In addition, when the screenshot range included in the screenshot configuration information of the screenshot configuration item is larger than the display size, a picture with the display size can be intercepted according to the default of the system, namely the screenshot size is set as the actual screenshot size; or screenshot prompting information is output to the user, so that the user can determine the actual screenshot range according to the actual situation. Of course, the manner of determining the actual screenshot range in this step may include, but is not limited to, the manner described above, and specifically, may be determined according to the actual situation.
The actual screenshot range of the screenshot operation is determined according to the display size in the page display effect and the screenshot range, the actual required screenshot range can be determined for the subsequent screenshot, and then the accuracy of the screenshot result can be ensured.
207. And executing screenshot operation on the screenshot page.
According to the obtained display effect and the actual screenshot range, the specific implementation in this step may be: and intercepting a page corresponding to the page display effect in the screenshot page. Specifically, based on the actual screenshot range determined in the foregoing step, in this step, the method may specifically be: and intercepting a page which corresponds to the actual screenshot range and corresponds to the page display effect from the screenshot page. Therefore, the captured picture can keep the resolution ratio same as the display effect, the screenshot can be carried out in the actual screenshot range, and the size of the picture after screenshot is ensured.
In addition, in the execution process based on the screenshot configuration item, in order to avoid the problem that the execution queue is congested when repeated operations are performed and a plurality of screenshot configuration items requiring screenshot operations exist at the same time, in the embodiment of the present invention, a corresponding screenshot task may be constructed for the screenshot configuration items to perform the method in this step. Therefore, before this step, the method according to the embodiment of the present invention may further include: generating a screenshot task according to the screenshot configuration item, and adding the screenshot task to a screenshot task list, wherein based on the screenshot task, the step specifically comprises the following steps: and executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list. In order to ensure that the screenshot task is prevented from being repeatedly executed, after this step, the method described in this embodiment may further include: and deleting the screenshot task corresponding to the screenshot operation from the screenshot task list.
In addition, after the screenshot operation is completed, corresponding feedback can be performed or the screenshot operation can be recorded in a system log according to the result of the screenshot operation, so that whether the screenshot operation is successfully executed or not can be determined according to the feedback result or log information subsequently, and the follow-up checking operation is facilitated.
Therefore, the screenshot task is generated according to the screenshot configuration item, the screenshot task is added to the screenshot task list, the screenshot operation on the screenshot page is executed according to the screenshot task in the screenshot task list, and finally the screenshot task corresponding to the screenshot operation is deleted from the screenshot task list after the screenshot is completed, so that the screenshot operation corresponding to the screenshot configuration item can be executed in a screenshot task mode, the screenshot operation is enabled to be more orderly, the problem of congestion of an execution queue possibly caused by the fact that a plurality of screenshot operations need to be executed is solved, the screenshot task is deleted after the screenshot operation is executed, and the problem of repeated execution of the same screenshot task can be solved.
208. And judging whether the screenshot operation is successfully executed.
In the process of screenshot operation, a condition of screenshot failure caused by URL change, invalidation or configuration information abnormality in the screenshot configuration item corresponding to the screenshot operation may occur, so after the screenshot operation is performed in step 207, it may be determined whether the screenshot operation is successfully performed according to the method in this step. In step 207, after the screenshot operation is performed, the operation result is fed back, or the screenshot operation result is recorded in a system log, so that in this step, the feedback information or the log information can be queried, and whether the screenshot operation is successfully executed or not can be determined. Of course, in the embodiment of the present invention, the specific manner for determining whether the screenshot operation is successfully executed may be performed based on a feedback code in the feedback information or an operation result record in the log information, or may be performed according to other manners, which is not specifically limited herein and may be selected according to actual situations.
Since there may be two cases of successful execution and unsuccessful execution of the screenshot operation after the step is determined, after the step is performed, when it is determined that the screenshot operation is successfully performed, step 209 is performed; when it is determined that the screenshot operation is not successfully executed, step 210 is executed.
209. If yes, saving the picture obtained after the screenshot operation.
When the screenshot operation is successfully executed in step 208, it indicates that the screenshot system has successfully executed the screenshot operation, and therefore, the intercepted picture needs to be saved. Specifically, when the picture obtained after the screenshot operation is saved, the picture can be stored through a storage position preset by a user. Or, the storage information may be fed back to the user, and the storage location where the picture is stored may be determined according to the input information of the user, where the mode and the location where the picture is stored may be selected as needed, and are not limited herein.
210. If not, alarm information is output.
If it is determined in the foregoing step 208 that the screenshot operation is not executed successfully, it is indicated that the screenshot operation is not executed, and there may be a situation of setting an exception in the screenshot configuration item, and therefore, an alarm message needs to be output to the outside to ensure that relevant personnel can timely know the exception situation in the current screenshot operation, so as to facilitate timely troubleshooting of the exception or the error. The alarm information comprises the configuration information of the screenshot configuration item corresponding to the screenshot operation and the reason of the operation failure, and the user can timely know the screenshot configuration item corresponding to the current screenshot operation which cannot be executed and the reason. Specifically, the failure reason may be set in advance according to an exception or an error that may occur during screenshot operation, and a failure reason code corresponding to a different exception or error is fed back when the exception occurs, so that a user can intuitively and conveniently know a screenshot configuration item that a current screenshot fails and a failure reason that the screenshot fails.
Therefore, by outputting the alarm information when the screenshot operation is judged not to be successfully executed, timely feedback to the outside can be ensured when the screenshot operation is not normally executed, a guarantee is provided for timely troubleshooting of the abnormity of the screenshot configuration item, and timely feedback of the screenshot result can be ensured when batch screenshot operations are carried out, so that the problem of screenshot failure caused by the abnormity of the screenshot configuration item is avoided, and the accuracy of the screenshot method is improved.
In addition, after the above steps, the method according to the embodiment of the present invention may further send the screenshot configuration item after the screenshot operation and the corresponding result to a related service system, such as an analysis system, an inquiry system, and the like, so that the related service system can perform corresponding operations such as analysis or inquiry. Specifically, the screenshot configuration item and the corresponding screenshot result may be periodically output and sent through a preset output interface according to a preset output plan, and of course, may also be output according to other manners, which is not limited herein.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention further provides a screenshot device, which is used for implementing the method shown in fig. 1. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 3, the apparatus includes: a first obtaining unit 31, a first judging unit 32, a first determining unit 33 and an executing unit 34, wherein
The first obtaining unit 31 may be configured to obtain a screenshot configuration item, where the screenshot configuration item includes screenshot configuration information required when a screenshot operation is executed, and the screenshot configuration information includes: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
a first determining unit 32, configured to determine whether the screenshot configuration item acquired by the first acquiring unit 31 needs to be executed;
the first determining unit 33 may be configured to determine, if the first determining unit 32 determines that execution is required, a screenshot page according to the display device information and the screenshot address in the screenshot configuration information;
the execution unit 34 may be configured to execute a screenshot operation on the screenshot page determined by the first determination unit 33.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention further provides a screenshot device, which is used for implementing the method shown in fig. 2. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 4, the apparatus includes: a first obtaining unit 401, a first judging unit 402, a first determining unit 403, and an executing unit 404, wherein,
the first obtaining unit 401 may be configured to obtain a screenshot configuration item, where the screenshot configuration item includes screenshot configuration information required when a screenshot operation is executed, and the screenshot configuration information includes: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
a first determining unit 402, configured to determine whether the screenshot configuration item acquired by the first acquiring unit 401 needs to be executed;
a first determining unit 403, configured to determine, if the first determining unit 402 determines that execution is required, a screenshot page according to the display device information and the screenshot address in the screenshot configuration information;
the execution unit 404 may be configured to execute a screenshot operation on the screenshot page determined by the first determination unit 403.
Furthermore, the screenshot configuration item stores the screenshot time or the screenshot time interval,
the first judging unit 402 includes:
the first determining module 4021 may be configured to determine whether the screenshot configuration item needs to be executed according to whether the current time of the system reaches the screenshot time; or,
the first obtaining module 4022 may be configured to obtain a previous adjacent screenshot time at which the screenshot operation is executed;
the second determining module 4023 may be configured to determine whether the screenshot configuration item needs to be executed according to whether the time interval between the current time of the system and the time difference between the last adjacent screenshot time acquired by the acquiring module 4022 reaches the screenshot time interval.
Further, the screenshot configuration item is stored in a screenshot configuration list, a timing plan for scanning the screenshot configuration item is also stored in the screenshot configuration list,
the first obtaining unit 401 includes:
the scanning module 4011 may be configured to scan screenshot configuration items in the screenshot configuration list according to the timing plan;
the second obtaining module 4012 may be configured to, if the screenshot configuration item is scanned by the scanning module 4011, obtain the screenshot configuration item from the screenshot configuration list.
Further, the apparatus may further include:
the adding unit 405 may be configured to generate a screenshot task according to the screenshot configuration item, and add the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the executing unit 404 may be further configured to execute a screenshot operation on the screenshot page according to the screenshot task added in the screenshot task list by the adding unit 405; and/or the presence of a gas in the gas,
a deleting unit 406, configured to delete the screenshot task corresponding to the screenshot operation executed by the executing unit 404 from the screenshot task list; and/or the presence of a gas in the gas,
a second judging unit 407, configured to judge whether the screenshot operation executed by the executing unit 404 is successfully executed;
a saving unit 408, configured to save the picture obtained after the screenshot operation if the second determining unit 407 determines that the screenshot operation is successfully executed;
the output unit 409 may be configured to, if the second determining unit 407 determines that the screenshot operation is not successfully executed, output alarm information, where the alarm information includes at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
Further, the apparatus further comprises:
a second obtaining unit 410, configured to obtain a display effect list, where a page display effect corresponding to each screenshot address when displayed in different display devices is stored in the display effect list;
a second determining unit 411, configured to determine, according to the display device information and the screenshot address in the screenshot configuration information, a page display effect corresponding to the screenshot page from the display effect list acquired by the second acquiring unit 410;
the executing unit 404 is further configured to intercept, in the screenshot page, a page corresponding to the page display effect determined by the second determining unit 411.
Further, the screenshot configuration information further includes: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and the device further comprises:
a third determining unit 412, configured to determine an actual screenshot range of the screenshot operation according to the display resolution and the display size in the page display effect and the screenshot range;
the executing unit 404 may be further specifically configured to intercept, from the screenshot page, a page corresponding to the page display effect and corresponding to the actual screenshot range determined by the third determining unit 412.
By means of the technical scheme, embodiments of the present invention provide a screenshot method and an apparatus, for a problem that a screenshot process is relatively complicated due to different tools or software needing to be downloaded respectively when a screenshot mode in the prior art is performed on different devices, the present invention determines a screenshot page by obtaining a screenshot configuration item and judging whether the screenshot configuration item needs to be executed, if the screenshot configuration item needs to be executed, determines a screenshot page according to display device information and a screenshot address in the screenshot configuration information, and then executes a screenshot operation on the screenshot page, and can execute a corresponding screenshot operation through the screenshot configuration item, wherein the screenshot configuration item includes screenshot configuration information required when the screenshot operation is performed, and the screenshot configuration information includes the display device information and the screenshot address used for determining the screenshot page, so that the method provided by the present invention can perform the screenshot operation corresponding to the display device through the display device information in the configuration information Therefore, the screenshot function can be realized on various different types of display equipment, the problem that the screenshot process is complicated due to the fact that different screenshot tools need to be downloaded for screenshot on different existing different equipment can be solved, the screenshot device can adapt to various different display equipment, and the screenshot device has good adaptability.
Meanwhile, the screenshot configuration items in the screenshot configuration list are scanned according to the timing plan, and when the screenshot configuration items are scanned, the screenshot configuration items are obtained from the screenshot configuration list, so that the screenshot configuration items can be stored in the screenshot configuration list, and when the timing plan for scanning the screenshot configuration items is also stored in the screenshot configuration list, the screenshot method can periodically obtain the configuration items according to the timing time set in the timing plan, so that the subsequent screenshot method can be performed at a certain period, the screenshot method can be periodically performed, and the automation and controllability of the screenshot operation are ensured. Furthermore, whether the screenshot configuration item needs to be executed or not is determined according to whether the current time of the system reaches the screenshot time or not, so that the function that whether the screenshot configuration item needs to be executed or not can be judged according to the comparison between the screenshot time and the current time when the screenshot configuration information in the screenshot configuration item is the screenshot time, and the screenshot configuration item can be executed in time. In addition, whether the screenshot configuration item needs to be executed or not is determined by acquiring the last adjacent screenshot time for executing the screenshot operation and according to whether the time difference between the current time of the system and the last adjacent screenshot time reaches the screenshot time interval or not, so that the screenshot configuration item can be executed in time.
In addition, the display effect corresponding to the screenshot page is determined in the display effect list through the display device information and the screenshot address, the specific display effect of the webpage corresponding to the screenshot address when the webpage is displayed by the display device can be determined, then the information such as the size and the resolution ratio which can be displayed by the webpage can be determined, and then a foundation is laid for the accuracy of the subsequent screenshot operation. And the actual screenshot range of the screenshot operation is determined according to the display size in the page display effect and the screenshot range, so that the actual required screenshot range can be determined for the subsequent screenshot, and the accuracy of the screenshot result can be ensured. In addition, a screenshot task is generated according to the screenshot configuration item, the screenshot task is added to a screenshot task list, then screenshot operation on the screenshot page is executed according to the screenshot task in the screenshot task list, and finally the screenshot task corresponding to the screenshot operation is deleted from the screenshot task list after screenshot is completed, so that the screenshot operation corresponding to the screenshot configuration item can be executed in a screenshot task mode, further the screenshot operation is more ordered, the problem of execution queue congestion possibly caused by the fact that a plurality of screenshot operations need to be executed is solved, the screenshot task is deleted after the screenshot operation is executed, and the problem of repeated execution of the same screenshot task can be solved. Meanwhile, alarm information is output when the screenshot operation is judged not to be successfully executed, so that timely feedback to the outside can be ensured when the screenshot operation is not normally executed, a guarantee is provided for timely troubleshooting of the abnormity of the screenshot configuration item, and the screenshot result can be ensured to be fed back timely when batch screenshot operations are carried out, so that the problem of screenshot failure caused by the abnormity of the screenshot configuration item is avoided, and the accuracy of the screenshot method is improved.
The screenshot device comprises a processor and a memory, wherein the acquisition unit, the first judgment unit, the execution unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the method for screenshot on various different devices is realized by adjusting kernel parameters, so that the problem that the screenshot process is complicated due to the fact that different tools or software need to be downloaded respectively when screenshot operation is performed on different devices is solved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, and the program implements the screenshot method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the screenshot method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring a screenshot configuration item, wherein the screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
judging whether the screenshot configuration item needs to be executed or not;
if the screenshot configuration information needs to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information;
and executing screenshot operation on the screenshot page.
Optionally, the screenshot time or the screenshot time interval is stored in the screenshot configuration item, and the determining whether the screenshot configuration item needs to be executed includes:
determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
acquiring the last adjacent screenshot moment for executing screenshot operation;
and determining whether the screenshot configuration item needs to be executed or not according to the time difference between the current time of the system and the last adjacent screenshot time and whether the screenshot time interval is reached or not.
Optionally, the screenshot configuration item is stored in a screenshot configuration list, a timing plan for scanning the screenshot configuration item is further stored in the screenshot configuration list, and the acquiring the screenshot configuration item includes:
scanning screenshot configuration items in the screenshot configuration list according to the timing plan;
and if the screenshot configuration item is scanned, acquiring the screenshot configuration item from the screenshot configuration list.
Optionally, before performing the screenshot operation on the screenshot page, the method further includes:
generating a screenshot task according to the screenshot configuration item, and adding the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the executing screenshot operation on the screenshot page comprises:
executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list; and/or the presence of a gas in the gas,
after the screenshot operation is executed, the method further comprises the following steps:
deleting the screenshot task corresponding to the screenshot operation from the screenshot task list;
and/or the presence of a gas in the gas,
judging whether the screenshot operation is successfully executed or not;
if yes, saving the picture obtained after the screenshot operation;
and if not, outputting alarm information, wherein the alarm information comprises at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
Optionally, after determining the screenshot page, the method further includes:
acquiring a display effect list, wherein the display effect list stores the corresponding page display effect of each screenshot address when the screenshot address is displayed in different display equipment;
determining a page display effect corresponding to the screenshot page from the display effect list according to the display equipment information and the screenshot address in the screenshot configuration information;
executing screenshot operation on the screenshot page, including:
and intercepting a page corresponding to the page display effect in the screenshot page.
Optionally, the screenshot configuration information further includes: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and after the page display effect corresponding to the screenshot page is determined, the method further comprises the following steps of:
determining an actual screenshot range of the screenshot operation according to the display size in the page display effect and the screenshot range;
the intercepting of the page corresponding to the page display effect in the screenshot page includes:
and intercepting a page which corresponds to the actual screenshot range and corresponds to the page display effect from the screenshot page.
The device in the embodiment of the invention can be a server, a PC, a PAD, a mobile phone and the like.
An embodiment of the present invention further provides a computer program product, which, when executed on a data processing apparatus, is adapted to execute a program that initializes the following method steps: acquiring a screenshot configuration item, wherein the screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
judging whether the screenshot configuration item needs to be executed or not;
if the screenshot configuration information needs to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information;
and executing screenshot operation on the screenshot page.
Optionally, the screenshot time or the screenshot time interval is stored in the screenshot configuration item, and the determining whether the screenshot configuration item needs to be executed includes:
determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
acquiring the last adjacent screenshot moment for executing screenshot operation;
and determining whether the screenshot configuration item needs to be executed or not according to the time difference between the current time of the system and the last adjacent screenshot time and whether the screenshot time interval is reached or not.
Optionally, the screenshot configuration item is stored in a screenshot configuration list, a timing plan for scanning the screenshot configuration item is further stored in the screenshot configuration list, and the acquiring the screenshot configuration item includes:
scanning screenshot configuration items in the screenshot configuration list according to the timing plan;
and if the screenshot configuration item is scanned, acquiring the screenshot configuration item from the screenshot configuration list.
Optionally, before performing the screenshot operation on the screenshot page, the method further includes:
generating a screenshot task according to the screenshot configuration item, and adding the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the executing screenshot operation on the screenshot page comprises:
executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list; and/or the presence of a gas in the gas,
after the screenshot operation is executed, the method further comprises the following steps:
deleting the screenshot task corresponding to the screenshot operation from the screenshot task list;
and/or the presence of a gas in the gas,
judging whether the screenshot operation is successfully executed or not;
if yes, saving the picture obtained after the screenshot operation;
and if not, outputting alarm information, wherein the alarm information comprises at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
Optionally, after determining the screenshot page, the method further includes:
acquiring a display effect list, wherein the display effect list stores the corresponding page display effect of each screenshot address when the screenshot address is displayed in different display equipment;
determining a page display effect corresponding to the screenshot page from the display effect list according to the display equipment information and the screenshot address in the screenshot configuration information;
executing screenshot operation on the screenshot page, including:
and intercepting a page corresponding to the page display effect in the screenshot page.
Optionally, the screenshot configuration information further includes: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and after the page display effect corresponding to the screenshot page is determined, the method further comprises the following steps of:
determining an actual screenshot range of the screenshot operation according to the display resolution and the display size in the page display effect and the screenshot range;
the intercepting of the page corresponding to the page display effect in the screenshot page includes:
and intercepting a page which corresponds to the actual screenshot range and corresponds to the page display effect from the screenshot page.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (10)
1. A method of screenshot, comprising:
acquiring a screenshot configuration item, wherein the screenshot configuration item comprises screenshot configuration information required by screenshot operation execution, and the screenshot configuration information comprises: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
judging whether the screenshot configuration item needs to be executed or not;
if the screenshot configuration information needs to be executed, determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information;
and executing screenshot operation on the screenshot page.
2. The method of claim 1, wherein a screenshot time or a screenshot time interval is stored in the screenshot configuration item, and the determining whether the screenshot configuration item needs to be executed includes:
determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
acquiring the last adjacent screenshot moment for executing screenshot operation;
and determining whether the screenshot configuration item needs to be executed or not according to the time difference between the current time of the system and the last adjacent screenshot time and whether the screenshot time interval is reached or not.
3. The method of claim 2, wherein the screenshot configuration items are stored in a screenshot configuration list, the screenshot configuration list further storing a timing plan for scanning the screenshot configuration items, and the obtaining the screenshot configuration items comprises:
scanning screenshot configuration items in the screenshot configuration list according to the timing plan;
and if the screenshot configuration item is scanned, acquiring the screenshot configuration item from the screenshot configuration list.
4. The method of any of claims 1-3, wherein prior to performing the screenshot operation on the screenshot page, the method further comprises:
generating a screenshot task according to the screenshot configuration item, and adding the screenshot task to a screenshot task list; and/or the presence of a gas in the gas,
the executing screenshot operation on the screenshot page comprises:
executing screenshot operation on the screenshot page according to the screenshot task in the screenshot task list; and/or the presence of a gas in the gas,
after the screenshot operation is executed, the method further comprises the following steps:
deleting the screenshot task corresponding to the screenshot operation from the screenshot task list;
and/or the presence of a gas in the gas,
judging whether the screenshot operation is successfully executed or not;
if yes, saving the picture obtained after the screenshot operation;
and if not, outputting alarm information, wherein the alarm information comprises at least one of configuration information of a screenshot configuration item corresponding to the screenshot operation and an operation failure reason.
5. The method of claim 4, wherein after determining the screenshot page, the method further comprises:
acquiring a display effect list, wherein the display effect list stores the corresponding page display effect of each screenshot address when the screenshot address is displayed in different display equipment;
determining a page display effect corresponding to the screenshot page from the display effect list according to the display equipment information and the screenshot address in the screenshot configuration information;
executing screenshot operation on the screenshot page, including:
and intercepting a page corresponding to the page display effect in the screenshot page.
6. The method of claim 5, wherein the screenshot configuration information further comprises: the screenshot range is at least part of the screenshot page, the page display effect comprises display resolution and display size, and after the page display effect corresponding to the screenshot page is determined, the method further comprises the following steps of:
determining an actual screenshot range of the screenshot operation according to the display resolution and the display size in the page display effect and the screenshot range;
the intercepting of the page corresponding to the page display effect in the screenshot page includes:
and intercepting a page which corresponds to the actual screenshot range and corresponds to the page display effect from the screenshot page.
7. A screenshot device, comprising:
a first obtaining unit, configured to obtain a screenshot configuration item, where the screenshot configuration item includes screenshot configuration information required when a screenshot operation is executed, and the screenshot configuration information includes: the system comprises a screen capture page and a server, wherein the screen capture page is used for displaying screen capture information and a screen capture address;
the first judgment unit is used for judging whether the screenshot configuration item needs to be executed or not;
the first determining unit is used for determining a screenshot page according to the display equipment information and the screenshot address in the screenshot configuration information if the screenshot is required to be executed;
and the execution unit is used for executing screenshot operation on the screenshot page.
8. The apparatus according to claim 7, wherein the screenshot configuration item stores a screenshot time or a screenshot time interval, and the first determining unit includes:
the first determining module is used for determining whether the screenshot configuration item needs to be executed or not according to whether the current time of the system reaches the screenshot moment or not; or,
the first acquisition module is used for acquiring the last adjacent screenshot moment for executing screenshot operation;
and the second determination module is used for determining whether the screenshot configuration item needs to be executed or not according to whether the time interval of the screenshot is reached or not according to the time difference between the current time of the system and the last adjacent screenshot time.
9. A storage medium, characterized in that the storage medium includes a stored program, wherein when the program runs, the storage medium is controlled to execute the screenshot method of any one of claims 1 to 6.
10. A processor, configured to run a program, wherein the program runs the screenshot method of any one of claim 1 to claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810982905.1A CN110865857A (en) | 2018-08-27 | 2018-08-27 | Screenshot method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810982905.1A CN110865857A (en) | 2018-08-27 | 2018-08-27 | Screenshot method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110865857A true CN110865857A (en) | 2020-03-06 |
Family
ID=69651117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810982905.1A Pending CN110865857A (en) | 2018-08-27 | 2018-08-27 | Screenshot method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110865857A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112215284A (en) * | 2020-10-12 | 2021-01-12 | 北京乐学帮网络技术有限公司 | Typesetting error checking method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101071438A (en) * | 2007-03-26 | 2007-11-14 | 腾讯科技(深圳)有限公司 | Capture server, distribution server, method and system for generating webpage capture |
CN102779123A (en) * | 2011-05-09 | 2012-11-14 | 腾讯科技(北京)有限公司 | Screenshot method and system of website displayed contents |
US20160117287A1 (en) * | 2014-10-22 | 2016-04-28 | Springbox Labs, Inc. | Method and Apparatus for Rendering Websites on Physical Devices |
CN107784031A (en) * | 2016-08-31 | 2018-03-09 | 北京国双科技有限公司 | A kind of method and device of multiple web pages sectional drawing |
-
2018
- 2018-08-27 CN CN201810982905.1A patent/CN110865857A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101071438A (en) * | 2007-03-26 | 2007-11-14 | 腾讯科技(深圳)有限公司 | Capture server, distribution server, method and system for generating webpage capture |
CN102779123A (en) * | 2011-05-09 | 2012-11-14 | 腾讯科技(北京)有限公司 | Screenshot method and system of website displayed contents |
US20160117287A1 (en) * | 2014-10-22 | 2016-04-28 | Springbox Labs, Inc. | Method and Apparatus for Rendering Websites on Physical Devices |
CN107784031A (en) * | 2016-08-31 | 2018-03-09 | 北京国双科技有限公司 | A kind of method and device of multiple web pages sectional drawing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112215284A (en) * | 2020-10-12 | 2021-01-12 | 北京乐学帮网络技术有限公司 | Typesetting error checking method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106547769B (en) | DOI display method and device | |
CN110868763B (en) | Method, device and system for establishing Bluetooth connection | |
CN112579948B (en) | Webpage screenshot method and device, storage medium and electronic equipment | |
CN111222592B (en) | Method and device for acquiring two-dimensional code of equipment | |
CN107844518B (en) | Method for evaluating download quantity of specified APP, data server, packaging platform and system | |
CN108399119B (en) | Method and device for data processing and automatic testing of browsing service kernel engine | |
CN112988605B (en) | Method and device for realizing WEB application automatic test | |
EP3244320A1 (en) | File path storing and local file accessing method and device | |
CN102841750B (en) | File opening method and device | |
CN111580769A (en) | Display control system, method, device, storage medium and processor | |
CN107220260B (en) | Page display method and device | |
CN116644250B (en) | Page detection method, page detection device, computer equipment and storage medium | |
CN110865857A (en) | Screenshot method and device | |
CN106611118B (en) | Method and device for applying login credentials | |
CN107566519B (en) | Code operation method and device, server and server cluster | |
CN109561121B (en) | Method and device for monitoring deployment | |
CN111309221A (en) | Page processing method, device and equipment | |
CN104516883A (en) | Webpage sharing method, device and system | |
CN112579952B (en) | Page display method and device, storage medium and electronic equipment | |
CN111124841B (en) | Alarm method and device for abnormal page and computer system | |
CN106598553B (en) | Information card generation method, device and system | |
CN110955847B (en) | Information processing method, device, storage medium and processor | |
CN110969461B (en) | Method and device for processing public number information, storage medium and processor | |
CN112948634A (en) | Method and equipment for determining surveillance video of target object | |
US20160277628A1 (en) | Information processing apparatus, information processsing system, and non-transitory computer readable 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200306 |