Picture typesetting method and equipment

文档序号:1242919 发布日期:2020-08-18 浏览:4次 中文

阅读说明:本技术 图片排版方法及设备 (Picture typesetting method and equipment ) 是由 曹艳红 于 2019-01-23 设计创作,主要内容包括:本发明实施例提供一种图片排版方法及设备,该方法包括:从采编系统获取排入版面的图片和其对应的图片数据,在图片的真实路径与图片排入版面时的原路径相同时,对原路径进行访问;如果访问到对应的图片文件,则获得文件的指纹数据;如果该指纹数据与上述图片的指纹数据不同,则对图片从服务器下载到本地的下载路径进行访问;如果访问到对应的图片文件,则获得文件的指纹数据;如果该指纹数据与上述图片的指纹数据不同,则根据图片从本地上传到服务器的上传路径从服务器上下载图片进行图片排版。本实施例提供的方法可以解决现有排版只能使用本地磁盘以及共享目录中的图片,导致缺图、排版效果不同,以及访问共享困难、不安全的问题,实现云采编。(The embodiment of the invention provides a picture typesetting method and equipment, wherein the method comprises the following steps: acquiring a picture arranged in a layout and picture data corresponding to the picture from the editing system, and accessing an original path when the real path of the picture is the same as the original path when the picture is arranged in the layout; if the corresponding picture file is accessed, fingerprint data of the file is obtained; if the fingerprint data is different from the fingerprint data of the picture, accessing a download path for downloading the picture from the server to the local; if the corresponding picture file is accessed, fingerprint data of the file is obtained; and if the fingerprint data is different from the fingerprint data of the picture, downloading the picture from the server according to an uploading path of the picture from the local uploading to the server to perform picture typesetting. The method provided by the embodiment can solve the problems that the existing typesetting only uses the local disk and the pictures in the shared directory, so that the image deficiency and the typesetting effect are different, and the access and sharing are difficult and unsafe, and realize cloud editing.)

1. A picture composition method is characterized by comprising the following steps:

acquiring a picture arranged in a layout and picture data corresponding to the picture from an editing system, wherein the picture data comprises fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path for downloading the picture from a server to the local and an upload path for uploading the picture from the local to the server;

acquiring a real path of the picture, and accessing the original path if the real path is the same as the original path;

if the picture file corresponding to the original path is accessed, obtaining fingerprint data of the picture file corresponding to the original path;

if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing the download path;

if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path;

and if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path to perform picture typesetting.

2. The method according to claim 1, further comprising, after the picture composition is performed by downloading the picture from the server according to the upload path:

determining a download path corresponding to the downloaded picture and downloaded from the server to the local, and updating the download path of the picture downloaded from the server to the local according to the determined download path.

3. The method of claim 1, further comprising:

if the real path is the same as the download path, accessing the download path;

if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path;

and if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, executing the step of downloading the picture from the server according to the upload path to perform picture typesetting.

4. The method of claim 1, further comprising:

if the picture file corresponding to the original path is not accessed, accessing the download path;

and if the picture file corresponding to the download path is not accessed, executing the step of downloading the picture from the server according to the upload path to perform picture typesetting.

5. The method according to claim 2, further comprising, after the updating the download path of the picture from the server to the local according to the determined download path:

acquiring the picture and the picture data which are arranged into the layout;

if the real path is the same as the original path, accessing the original path;

if the picture file corresponding to the original path is accessed, obtaining fingerprint data of the picture file corresponding to the original path;

if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path, uploading the picture file corresponding to the original path to a server preset directory, updating the uploading path according to the server preset directory, and uploading the typeset layout file to the editing system after the picture is typeset.

6. The method of claim 5, further comprising:

if the real path is the same as a download path of the picture from the server to the local, acquiring fingerprint data of a picture file corresponding to the download path of the picture from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

7. The method of claim 5, further comprising:

if the picture file corresponding to the original path is not accessed, obtaining fingerprint data of the picture file corresponding to the downloading path from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

8. A picture composing apparatus, comprising:

the system comprises a first picture acquisition module, a second picture acquisition module and a third picture acquisition module, wherein the first picture acquisition module is used for acquiring a picture arranged in a layout and picture data corresponding to the picture from an editing system, and the picture data comprises fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path for downloading the picture from a server to the local and an upload path for uploading the picture from the local to the server;

the first picture access module is used for acquiring a real path of the picture, and accessing the original path if the real path is the same as the original path;

the first fingerprint data acquisition module is used for acquiring the fingerprint data of the picture file corresponding to the original path if the picture file corresponding to the original path is accessed;

the second picture access module is used for accessing the download path if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture;

the second fingerprint data acquisition module is used for acquiring fingerprint data of the picture file corresponding to the download path if the picture file corresponding to the download path is accessed;

and the picture typesetting module is used for downloading the pictures from the server according to the uploading path to perform picture typesetting if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the pictures.

9. The apparatus of claim 8, further comprising:

and the local data updating module is used for determining a download path corresponding to the downloaded picture from the server to the local after the picture typesetting module downloads the picture from the server according to the upload path for picture typesetting, and updating the download path of the picture from the server to the local according to the determined download path.

10. The apparatus of claim 8, further comprising:

the third picture access module is used for accessing the download path if the real path is the same as the download path;

the third fingerprint data obtaining module is used for obtaining the fingerprint data of the picture file corresponding to the download path if the picture file corresponding to the download path is accessed;

the picture typesetting module is also used for executing the step of downloading the picture from the server according to the uploading path to perform picture typesetting if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the picture.

11. The apparatus of claim 8, further comprising:

the fourth picture access module is used for accessing the download path if the picture file corresponding to the original path is not accessed;

and the picture typesetting module is also used for executing the step of picture typesetting by downloading pictures from the server according to the uploading path if the picture file corresponding to the downloading path is not accessed.

12. The apparatus of claim 9, further comprising:

the second picture acquisition module is used for acquiring the picture and the picture data which are arranged in the layout after the local data updating module updates the downloading path of the picture from the server to the local according to the determined downloading path;

the fifth picture access module is used for accessing the original path if the real path is the same as the original path;

the fourth fingerprint data obtaining module is used for obtaining the fingerprint data of the picture file corresponding to the original path if the picture file corresponding to the original path is accessed;

and the server data updating module is used for updating the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

13. The apparatus of claim 12, further comprising:

a fifth fingerprint data obtaining module, configured to obtain fingerprint data of a picture file corresponding to a download path from a server to a local place, if the real path is the same as the download path from the server to the local place;

and the server data updating module is also used for updating the fingerprint data of the picture according to the acquired fingerprint data if the acquired fingerprint data is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory and uploading the layout file after the picture is typeset to the editing system.

14. The apparatus of claim 12, further comprising:

the sixth fingerprint data determining module is used for obtaining the fingerprint data of the picture file corresponding to the local download path downloaded from the server if the picture file corresponding to the original path is not accessed;

and the server data updating module is also used for updating the fingerprint data of the picture according to the acquired fingerprint data if the acquired fingerprint data is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory and uploading the layout file after the picture is typeset to the editing system.

15. A picture composing apparatus, comprising: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of composing a picture according to any one of claims 1 to 7.

16. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for composing a picture according to any one of claims 1 to 7 is implemented.

Technical Field

The embodiment of the invention relates to the technical field of media gathering, editing and typesetting, in particular to a picture typesetting method and picture typesetting equipment.

Background

The continuous appearance and change of media forms and the fusion of media contents, channels and functional layers enable people to have a meaning to cover wider words when using the concept of media, so far, the concept of 'full media' is widely applied. The full media system comprises various transmission tools including newspapers, magazines, broadcasts, televisions, audio and video, movies, publications, networks, telecommunications and satellite communication, covers all senses of receiving information by people such as sight, hearing, image, touch and the like, selects the most suitable media form and pipeline according to different requirements of audiences, is deeply integrated, provides super-subdivided services, and realizes the comprehensive coverage and the best transmission effect of the audiences.

The full-media news gathering and editing system is a standard production system for newspaper agencies, and users can use the system to type and then print newspaper by using the arranged edition. The existing typesetting can only use the local disk and the pictures in the shared directory.

This has two problems: after one computer uses the local picture typesetting, when the typesetting is continued on other computers, the local directories of other computers do not have the picture file, so that the picture missing effect and the typesetting effect are different; the method can be only used in a local area network, all computers must be ensured to access the shared directory, access is difficult, in addition, the shared file is easy to be tampered, and the method is an extremely unsafe mode.

Disclosure of Invention

The embodiment of the invention provides a picture typesetting method and picture typesetting equipment, which are used for solving the problems that only local disks and pictures in a shared directory can be used during typesetting, so that the picture deficiency and different typesetting effects are caused, and the shared directory is difficult and unsafe to access.

In a first aspect, an embodiment of the present invention provides a method for typesetting a picture, including:

acquiring a picture arranged in a layout and picture data corresponding to the picture from an editing system, wherein the picture data comprises fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path for downloading the picture from a server to the local and an upload path for uploading the picture from the local to the server;

acquiring a real path of the picture, and accessing the original path if the real path is the same as the original path;

if the picture file corresponding to the original path is accessed, obtaining fingerprint data of the picture file corresponding to the original path;

if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing the download path;

if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path;

and if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path to perform picture typesetting.

In a possible design, after the picture composition is performed by downloading the picture from the server according to the upload path, the method further includes:

determining a download path corresponding to the downloaded picture and downloaded from the server to the local, and updating the download path of the picture downloaded from the server to the local according to the determined download path.

In one possible design, the method further includes:

if the real path is the same as the download path, accessing the download path;

if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path;

and if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, executing the step of downloading the picture from the server according to the upload path to perform picture typesetting.

In one possible design, the method further includes:

if the picture file corresponding to the original path is not accessed, accessing the download path;

and if the picture file corresponding to the download path is not accessed, executing the step of downloading the picture from the server according to the upload path to perform picture typesetting.

In a possible design, after the updating the download path of the picture from the server to the local according to the determined download path, the method further includes:

acquiring the picture and the picture data which are arranged into the layout;

if the real path is the same as the original path, accessing the original path;

if the picture file corresponding to the original path is accessed, obtaining fingerprint data of the picture file corresponding to the original path;

if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path, uploading the picture file corresponding to the original path to a server preset directory, updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

In one possible design, the method further includes:

if the real path is the same as a download path of the picture from the server to the local, acquiring fingerprint data of a picture file corresponding to the download path of the picture from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

In one possible design, the method further includes:

if the picture file corresponding to the original path is not accessed, obtaining fingerprint data of the picture file corresponding to the downloading path from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

In a second aspect, an embodiment of the present invention provides a picture composition device, including:

the system comprises a first picture acquisition module, a second picture acquisition module and a third picture acquisition module, wherein the first picture acquisition module is used for acquiring a picture arranged in a layout and picture data corresponding to the picture from an editing system, and the picture data comprises fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path for downloading the picture from a server to the local and an upload path for uploading the picture from the local to the server;

the first picture access module is used for acquiring a real path of the picture, and accessing the original path if the real path is the same as the original path;

the first fingerprint data acquisition module is used for acquiring the fingerprint data of the picture file corresponding to the original path if the picture file corresponding to the original path is accessed;

the second picture access module is used for accessing the download path if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture;

the second fingerprint data acquisition module is used for acquiring fingerprint data of the picture file corresponding to the download path if the picture file corresponding to the download path is accessed;

and the picture typesetting module is used for downloading the pictures from the server according to the uploading path to perform picture typesetting if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the pictures.

In one possible design, the above apparatus further includes:

and the local data updating module is used for determining a download path corresponding to the downloaded picture from the server to the local after the picture typesetting module downloads the picture from the server according to the upload path for picture typesetting, and updating the download path of the picture from the server to the local according to the determined download path.

In one possible design, the above apparatus further includes:

the third picture access module is used for accessing the download path if the real path is the same as the download path;

the third fingerprint data obtaining module is used for obtaining the fingerprint data of the picture file corresponding to the download path if the picture file corresponding to the download path is accessed;

the picture typesetting module is also used for executing the step of downloading the picture from the server according to the uploading path to perform picture typesetting if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the picture.

In one possible design, the above apparatus further includes:

the fourth picture access module is used for accessing the download path if the picture file corresponding to the original path is not accessed;

and the picture typesetting module is also used for executing the step of picture typesetting by downloading pictures from the server according to the uploading path if the picture file corresponding to the downloading path is not accessed.

In one possible design, the above apparatus further includes:

the second picture acquisition module is used for acquiring the picture and the picture data which are arranged in the layout after the local data updating module updates the downloading path of the picture from the server to the local according to the determined downloading path;

the fifth picture access module is used for accessing the original path if the real path is the same as the original path;

the fourth fingerprint data obtaining module is used for obtaining the fingerprint data of the picture file corresponding to the original path if the picture file corresponding to the original path is accessed;

and the server data updating module is used for updating the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

In one possible design, the above apparatus further includes:

a fifth fingerprint data obtaining module, configured to obtain fingerprint data of a picture file corresponding to a download path from a server to a local place, if the real path is the same as the download path from the server to the local place;

and the server data updating module is also used for updating the fingerprint data of the picture according to the acquired fingerprint data if the acquired fingerprint data is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory and uploading the layout file after the picture is typeset to the editing system.

In one possible design, the above apparatus further includes:

the sixth fingerprint data determining module is used for obtaining the fingerprint data of the picture file corresponding to the local download path downloaded from the server if the picture file corresponding to the original path is not accessed;

and the server data updating module is also used for updating the fingerprint data of the picture according to the acquired fingerprint data if the acquired fingerprint data is different from the fingerprint data of the picture, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory and uploading the layout file after the picture is typeset to the editing system.

In a third aspect, an embodiment of the present invention provides a picture composition device, including: at least one processor and memory;

the memory stores computer-executable instructions;

the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the method of composing a picture as set forth in the first aspect above and in various possible designs of the first aspect.

In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the method for composing a picture according to the first aspect and various possible designs of the first aspect is implemented.

In the method and the device for typesetting the picture, the picture to be typeset and the picture data corresponding to the picture are acquired from the editing system, the real path of the picture is further acquired, and when the real path is the same as the original path of the picture to be typeset, the original path is accessed; if the picture file corresponding to the original path is accessed, acquiring fingerprint data of the picture file corresponding to the original path; if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing a download path for downloading the picture from a server to the local; if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path; if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the picture, the picture is downloaded from the server according to the uploading path of the picture uploaded to the server from the local for picture typesetting, so that the system can safely and conveniently get rid of the limitation of a local area network on the premise of not changing the typesetting mode of the existing user, the problems that the existing typesetting only uses a local disk and the picture in a shared directory, the picture is lack of the picture, the typesetting effect is different, the shared directory is difficult to access and unsafe are solved, and cloud collection and edition are realized.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a schematic diagram of an architecture of a picture composition system according to an embodiment of the present invention;

fig. 2 is a first schematic flow chart of a picture composition method according to an embodiment of the present invention;

fig. 3 is a second flowchart illustrating a picture composition method according to an embodiment of the present invention;

fig. 4 is a first schematic structural diagram of a picture composition apparatus according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a picture composition apparatus according to an embodiment of the present invention;

fig. 6 is a schematic diagram of a hardware structure of the picture composition device according to the embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The continuous appearance and change of media forms and the fusion of media contents, channels and functional layers enable people to have a meaning to cover wider words when using the concept of media, so far, the concept of 'full media' is widely applied. The full-media news gathering and editing system is a standard production system for newspaper agencies, and users can use the system to type and then print newspaper by using the arranged edition. The existing typesetting can only use the local disk and the pictures in the shared directory. This has two problems: after one computer uses the local picture typesetting, when the typesetting is continued on other computers, the local directories of other computers do not have the picture file, so that the picture missing effect and the typesetting effect are different; the method can be only used in a local area network, all computers must be ensured to access the shared directory, access is difficult, in addition, the shared file is easy to be tampered, and the method is an extremely unsafe mode.

Therefore, in view of the above problems, the present invention provides a method for typesetting a picture, which includes obtaining a picture to be typeset and picture data corresponding to the picture from a compiling system, further obtaining a real path of the picture, and accessing the original path when the real path is the same as the original path when the picture is typeset; if the picture file corresponding to the original path is accessed, acquiring fingerprint data of the picture file corresponding to the original path; if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing a download path for downloading the picture from a server to the local; if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path; if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the picture, the picture is downloaded from the server according to the uploading path of the picture uploaded to the server from the local for picture typesetting, so that the system can safely and conveniently get rid of the limitation of a local area network on the premise of not changing the typesetting mode of the existing user, the problems that the existing typesetting only uses a local disk and the picture in a shared directory, the picture is lack of the picture, the typesetting effect is different, the shared directory is difficult to access and unsafe are solved, and cloud collection and edition are realized. Wherein, cloud adopts and compiles: the full media authoring system can be accessed wherever networked, including typesetting using the full media system.

Fig. 1 is an application scene diagram of a picture typesetting method provided by the invention. As shown in fig. 1, a terminal device 101 may obtain a picture arranged in a layout and picture data corresponding to the picture from an editing system 102, where the picture data includes fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path where the picture is downloaded from a server to a local place, and an upload path where the picture is uploaded from the local place to the server, and may obtain a real path of the picture, and if the real path is the same as the original path, access the original path, and if a picture file corresponding to the original path is accessed, obtain fingerprint data of the picture file corresponding to the original path, and if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, access the download path, and if the picture file corresponding to the download path is accessed, obtain fingerprint data of the picture file corresponding to the download path, and if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path to perform picture typesetting and the like.

It is to be understood that the terminal devices to which the present invention relates may also be referred to as user equipment, mobile stations, mobile terminals, etc. The terminal device may be a mobile phone, a tablet computer, a computer with a wireless transceiving function, and the like, and the present invention is not limited specifically.

Fig. 2 is a first flowchart of a picture composition method according to an embodiment of the present invention, where an execution subject of the embodiment may be a terminal device in the embodiment shown in fig. 1. As shown in fig. 2, the method includes:

s201, obtaining a picture of a layout to be arranged and picture data corresponding to the picture from an editing system, wherein the picture data comprises fingerprint data of the picture, an original path of the picture when the picture is arranged in the layout, a download path of the picture from a server to the local and an upload path of the picture from the local to the server.

Before the picture of the input layout and the picture data corresponding to the picture are obtained from the editing system, a typesetting layout file can be started, the picture is input into the layout file, json data is created, and the real path of the picture is recorded into an original path SrcPath when the picture in the json data is input into the layout; acquiring fingerprint data of a picture file corresponding to an original path when a picture in the json data is arranged in a layout, and recording the acquired fingerprint data into the fingerprint data FileFingerprint of the picture in the json data; and establishing a corresponding relation between the picture and the json data.

Wherein json:

the above FileFingerprint is a fingerprint of the picture, such as an MD5 value or a Hash encrypted value. SrcPath is the original path of the picture when it is laid out in the plate. The LocalPath is a download path for downloading the picture from the server to the local. The FtpPath is an upload path for uploading a picture from a local server to a server, wherein the server may be an FTP server, and the FTP server is a computer providing file storage and access services on the internet and provides services according to an FTP protocol.

Specifically, the acquiring of the picture arranged in the layout and the picture data corresponding to the picture from the editing system may include: and acquiring and opening the layout file from the editing system, and acquiring the picture in the layout file and json data corresponding to the picture.

S202, obtaining a real path of the picture, and accessing the original path if the real path is the same as the original path.

And if the two compared paths are the same, accessing the original path of the picture which is arranged in the layout.

And S203, if the picture file corresponding to the original path is accessed, obtaining the fingerprint data of the picture file corresponding to the original path.

In the embodiment of the present invention, if the picture file corresponding to the original path when the picture is arranged in the layout is accessed, the fingerprint data of the picture file, such as the MD5 value or the Hash encryption value, is calculated.

If the picture file corresponding to the original path when the picture is arranged in the layout is not accessed, accessing a download path for downloading the picture in the picture data from the server to the local, if the picture file corresponding to the download path is accessed, calculating fingerprint data of the picture file, judging whether the calculated fingerprint data is the same as the fingerprint data of the picture in the picture data, and if the calculated fingerprint data is different from the fingerprint data of the picture in the picture data, downloading the picture from the server according to an upload path for uploading the picture in the picture data to the server from the local for picture layout.

And S204, if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing the download path.

Here, if the fingerprint data of the picture file corresponding to the original path when the picture is placed in the edition is different from the fingerprint data of the picture, the download path for downloading the picture from the server to the local in the picture data is accessed.

S205, if the picture file corresponding to the download path is accessed, obtaining the fingerprint data of the picture file corresponding to the download path.

If the picture file corresponding to the download path from the server to the local is accessed, the fingerprint data of the picture file corresponding to the download path is calculated, and if the picture file corresponding to the download path from the server to the local is not accessed, the picture is downloaded from the server according to the upload path from the local to the server to perform picture typesetting.

And S206, if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path to perform picture typesetting.

And if the fingerprint data of the picture file corresponding to the download path of the picture from the server to the local is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path of the picture uploaded to the server from the local for picture typesetting.

The picture typesetting method provided by this embodiment acquires the picture to be typeset and the picture data corresponding to the picture from the editing system, further acquires the real path of the picture, and accesses the original path when the real path is the same as the original path when the picture is typeset; if the picture file corresponding to the original path is accessed, acquiring fingerprint data of the picture file corresponding to the original path; if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing a download path for downloading the picture from a server to the local; if the picture file corresponding to the download path is accessed, acquiring fingerprint data of the picture file corresponding to the download path; if the fingerprint data of the picture file corresponding to the downloading path is different from the fingerprint data of the picture, the picture is downloaded from the server according to the uploading path of the picture uploaded to the server from the local for picture typesetting, so that the system can safely and conveniently get rid of the limitation of a local area network on the premise of not changing the typesetting mode of the existing user, the problems that the existing typesetting only uses a local disk and the picture in a shared directory, the picture is lack of the picture, the typesetting effect is different, the shared directory is difficult to access and unsafe are solved, and cloud collection and edition are realized.

Fig. 3 is a second schematic flowchart of a picture typesetting method according to an embodiment of the present invention, and this embodiment describes in detail a specific implementation process of this embodiment on the basis of the embodiment of fig. 2. As shown in fig. 3, the method includes:

s301, obtaining a picture arranged in a layout and picture data corresponding to the picture from an editing system, wherein the picture data comprises fingerprint data of the picture, an original path when the picture is arranged in the layout, a download path of the picture from a server to a local place and an upload path of the picture from the local place to the server.

The specific implementation of S301 in this embodiment is similar to S201 in the foregoing embodiment, and is not described here again.

S302, acquiring a real path of the picture, and judging whether the real path is equal to the original path or the download path.

If the real path is the same as the original path, executing steps S303 to S308, and if the real path is the same as the download path, executing steps S309 and S311.

S303, if the real path is the same as the original path, accessing the original path.

S304, if the picture file corresponding to the original path is accessed, obtaining the fingerprint data of the picture file corresponding to the original path.

Optionally, if the picture file corresponding to the original path is not accessed, accessing the download path;

and if the picture file corresponding to the download path is not accessed, executing the step of downloading the picture from the server according to the upload path to perform picture typesetting.

S305, if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, accessing the download path.

S306, if the picture file corresponding to the download path is accessed, obtaining the fingerprint data of the picture file corresponding to the download path.

And S307, if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, downloading the picture from the server according to the upload path to perform picture typesetting.

S308, determining a download path corresponding to the downloaded picture and downloaded from the server to the local, and updating the download path of the picture downloaded from the server to the local according to the determined download path.

Optionally, after the downloading path from the server to the local is updated according to the determined downloading path, the method further includes:

acquiring the picture and the picture data which are arranged into the layout;

if the real path is the same as the original path, accessing the original path;

if the picture file corresponding to the original path is accessed, obtaining fingerprint data of the picture file corresponding to the original path;

if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path, uploading the picture file corresponding to the original path to a server preset directory, updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

Here, if the fingerprint data of the picture file corresponding to the original path is the same as the fingerprint data of the picture, uploading the layout file after the picture layout to the editing system.

Optionally, if the real path is the same as a download path of the picture from the server to the local, obtaining fingerprint data of the picture file corresponding to the download path of the picture from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

Specifically, if the obtained fingerprint data is the same as the fingerprint data of the picture, the layout file after the picture is typeset is uploaded to the editing system.

Optionally, if the picture file corresponding to the original path is not accessed, obtaining fingerprint data of the picture file corresponding to a download path from the server to the local;

if the obtained fingerprint data is different from the fingerprint data of the picture, updating the fingerprint data of the picture according to the obtained fingerprint data, uploading the picture file corresponding to the original path to a server preset directory, executing the step of updating the uploading path according to the server preset directory, and uploading the layout file after the picture is typeset to the editing system.

S309, if the real path is the same as the download path, accessing the download path.

S310, if the picture file corresponding to the download path is accessed, obtaining the fingerprint data of the picture file corresponding to the download path.

Here, if the picture file corresponding to the download path is not accessed, step S307 is executed to download the picture from the server according to the upload path to perform the picture composition.

And S311, if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture, executing the step S307 of downloading the picture from the server according to the upload path to perform the picture typesetting.

The picture typesetting method provided by the embodiment can enable the system to safely and conveniently get rid of the limitation of the local area network on the premise of not changing the existing user typesetting mode, solves the problems of different image deficiency and typesetting effects and difficulty and unsafety in accessing the shared directory caused by only using the local disk and the pictures in the shared directory in the existing typesetting, and realizes cloud collection and edition.

Fig. 4 is a first schematic structural diagram of a picture composition device according to an embodiment of the present invention. As shown in fig. 4, the picture composing device 40 includes: a first picture obtaining module 401, a first picture accessing module 402, a first fingerprint data obtaining module 403, a second picture accessing module 404, a second fingerprint data obtaining module 405, and a picture composing module 406.

The first picture obtaining module 401 is configured to obtain, from an editing system, a picture arranged in a layout and picture data corresponding to the picture, where the picture data includes fingerprint data of the picture, an original path of the picture when the picture is arranged in the layout, a download path of the picture from a server to a local place, and an upload path of the picture from the local place to the server.

A first picture accessing module 402, configured to obtain a real path of the picture, and if the real path is the same as the original path, access the original path.

A first fingerprint data obtaining module 403, configured to obtain, if the picture file corresponding to the original path is accessed, fingerprint data of the picture file corresponding to the original path.

A second picture access module 404, configured to access the download path if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture.

A second fingerprint data obtaining module 405, configured to obtain, if the picture file corresponding to the download path is accessed, fingerprint data of the picture file corresponding to the download path.

And a picture typesetting module 406, configured to download the picture from the server according to the upload path to perform picture typesetting if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture.

The device provided in this embodiment may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.

Fig. 5 is a schematic structural diagram of a picture composition device according to an embodiment of the present invention. As shown in fig. 5, this embodiment further includes, on the basis of the embodiment in fig. 4: a local data updating module 407, a third picture accessing module 408, a third fingerprint data obtaining module 409, a fourth picture accessing module 410, a second picture obtaining module 411, a fifth picture accessing module 412, a fourth fingerprint data obtaining module 413, a server data updating module 414, a fifth fingerprint data obtaining module 415, and a sixth fingerprint data determining module 416.

In a possible design, the local data updating module 407 is configured to determine, after the picture composition module 406 downloads the picture from the server according to the upload path for picture composition, a download path corresponding to the downloaded picture and downloaded from the server to the local, and update the download path of the picture downloaded from the server to the local according to the determined download path.

In a possible design, the third picture accessing module 408 is configured to access the download path if the real path is the same as the download path.

A third fingerprint data obtaining module 409, configured to obtain, if the picture file corresponding to the download path is accessed, fingerprint data of the picture file corresponding to the download path.

The picture composition module 406 is further configured to execute the step of downloading the picture from the server according to the upload path to perform picture composition if the fingerprint data of the picture file corresponding to the download path is different from the fingerprint data of the picture.

In a possible design, the fourth picture accessing module 410 is configured to access the download path if the picture file corresponding to the original path is not accessed;

the picture composition module 406 is further configured to execute the step of downloading the picture from the server according to the upload path to perform picture composition if the picture file corresponding to the download path is not accessed.

In a possible design, the second picture obtaining module 411 is configured to obtain the picture and the picture data that are arranged in the layout after the local data updating module updates the download path of the picture downloaded from the server to the local according to the determined download path.

A fifth picture accessing module 412, configured to access the original path if the actual path is the same as the original path.

A fourth fingerprint data obtaining module 413, configured to obtain, if the picture file corresponding to the original path is accessed, fingerprint data of the picture file corresponding to the original path.

And the server data updating module 414 is configured to update the fingerprint data of the picture according to the fingerprint data of the picture file corresponding to the original path, upload the picture file corresponding to the original path to a server preset directory, update the upload path according to the server preset directory, and upload the layout file after the picture is typeset to the editing system if the fingerprint data of the picture file corresponding to the original path is different from the fingerprint data of the picture.

In a possible design, the fifth fingerprint data obtaining module 415 is configured to obtain fingerprint data of a picture file corresponding to a download path from the server to the local if the real path is the same as the download path from the server to the local.

The server data updating module 414 is further configured to update the fingerprint data of the picture according to the obtained fingerprint data if the obtained fingerprint data is different from the fingerprint data of the picture, upload the picture file corresponding to the original path to a server preset directory, execute the step of updating the upload path according to the server preset directory, and upload the layout file after the picture is typeset to the editing system.

In a possible design, the sixth fingerprint data determining module 416 is configured to, if the picture file corresponding to the original path is not accessed, obtain fingerprint data of the picture file corresponding to the download path where the picture is downloaded from the server to the local.

The server data updating module 414 is further configured to update the fingerprint data of the picture according to the obtained fingerprint data if the obtained fingerprint data is different from the fingerprint data of the picture, upload the picture file corresponding to the original path to a server preset directory, execute the step of updating the upload path according to the server preset directory, and upload the layout file after the picture is typeset to the editing system.

The device provided in this embodiment may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.

Fig. 6 is a schematic diagram of a hardware structure of the picture composition device according to the embodiment of the present invention. As shown in fig. 6, the picture layout apparatus 60 of the present embodiment includes: a processor 601 and a memory 602; wherein

A memory 602 for storing computer-executable instructions;

the processor 601 is configured to execute the computer execution instructions stored in the memory to implement the steps performed by the terminal device in the foregoing embodiments. Reference may be made in particular to the description relating to the method embodiments described above.

Alternatively, the memory 602 may be separate or integrated with the processor 601.

When the memory 602 is separately provided, the picture composing device further comprises a bus 603 for connecting the memory 602 and the processor 601.

The embodiment of the invention also provides a computer-readable storage medium, wherein a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the picture typesetting method is realized.

In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.

The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.

The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.

It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.

The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.

The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.

The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.

An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.

Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据处理方法、数据处理设备及计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!