A kind of resource storage method, resource downloading method, system, equipment and medium
Technical field
The present embodiments relate to large-size screen monitors field of display technology more particularly to a kind of resource storage methods, resource downloading side
Method, system, equipment and medium.
Background technique
Currently, more and more occasions carry out advertising, education and instruction, hotel eatery using the intelligent machine of big display screen
Commerce distribution etc..
Before carrying out advertising, education and instruction and commerce distribution etc. using the intelligent machine of big display screen, with intelligence
The corresponding server-side of energy machine certainly will be previously stored with packaged complete programs packet, which includes various resources, such as is schemed
Piece, video, music and document etc..Different program packets may include certain identical resource, therefore equal for each program
The mode of the good complete programs packet of storage package will lead to and store a large amount of duplicate resources in server-side, causes the magnetic of server-side
Disk space cannot effectively utilize.
Meanwhile when intelligent machine needs to show particular advertisement, corresponding advertising programme packet can be downloaded from server-side,
For this downloading mode just as one black box of downloading for intelligent machine, intelligent machine can not know the advertising programme packet of downloading
In include which resource, therefore, this mode will lead to intelligent machine to repeat resource downloading and storage, cause intelligent machine to deposit
The waste in space is stored up, while also resulting in the significant wastage of bandwidth.
Summary of the invention
The embodiment of the present invention provides a kind of resource storage method, resource downloading method, system, equipment and medium, to avoid
Server-side carries out same asset to repeat storage, realizes the effective use to server-side memory space.
In a first aspect, it is applied to server-side the embodiment of the invention provides a kind of resource storage method, this method comprises:
When receiving when storage resource packet, current money is determined based on each resource file in storage resource packet
Source file;
Judge whether the Current resource file was stored;
If the Current resource file was stored, establish it is described to storage resource packet and it is stored described in
Mapping relations between Current resource file;
If the Current resource file was not stored, separate storage is carried out to the Current resource file, and build
It is vertical described to the mapping relations between storage resource packet and the Current resource file.
Second aspect, the embodiment of the invention also provides a kind of resource downloading methods, are applied to intelligent terminal, are used for from base
Corresponding resource, this method are downloaded in the server-side that the described in any item resource storage methods of claim 1-3 carry out resource storage
Include:
When receiving download instruction, Current resource file is determined based on each resource file in resources to be downloaded packet;
Judge whether the Current resource file has existed;If so, no longer Current resource file is downloaded, it is no
Then, the Current resource file is downloaded from server-side.
The third aspect, the embodiment of the invention also provides a kind of resource systems, comprising:
Server-side, for being based on the described in any item resource storage method storage resource packets of claim 1-3;
Intelligent terminal, for based on if the described in any item resource downloading methods of claim 4-7 are under the server-side
Carry resource.
Fourth aspect, the embodiment of the invention also provides a kind of electronic equipment, the electronic equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes resource storage method as described in any one of claims 1-3, and such as the described in any item resources of claim 4-7
Method for down loading.
5th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the program realize resource storage method as described in any one of claims 1-3 when being executed by processor, and such as right
It is required that the described in any item resource downloading methods of 4-7.
A kind of resource storage scheme provided by the invention, when receiving when storage resource packet, for described wait store money
Each resource file in the packet of source, judges whether Current resource file was stored;If the Current resource file is
It was stored, was then established described to the mapping relations between storage resource packet and the stored Current resource file;If
The Current resource file was not stored, then carried out separate storage to the Current resource file, and was established described wait deposit
The mapping relations between resource packet and the Current resource file are stored up, server-side is avoided and same asset is carried out to repeat storage,
Realize the effective use to server-side memory space.
Detailed description of the invention
Fig. 1 is a kind of resource storage method flow diagram that the embodiment of the present invention one provides;
Fig. 2 is a kind of resource downloading method flow diagram provided by Embodiment 2 of the present invention;
Fig. 3 is that a kind of structure for resource system that the embodiment of the present invention three provides is intended to;
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of resource storage method flow diagram that the embodiment of the present invention one provides, and this method is applicable to take
It the case where end storage mass advertising resource of being engaged in, can be executed by resource storage device, which can be by software and/or hard
The mode of part is realized, and is integrated in server-side.Referring specifically to shown in Fig. 1, which comprises
Step 110, when receiving when storage resource packet, based on described true to each resource file in storage resource packet
Settled preceding resource file.
When receiving when storage resource packet, for each resource file in storage resource packet, judgement is current
Whether resource file was stored, if the Current resource file was stored, was established described to storage resource
Mapping relations between packet and the stored Current resource file;If the Current resource file was not stored,
Separate storage then is carried out to the Current resource file, and is established described between storage resource packet and the Current resource file
Mapping relations.It is i.e. described successively to carry out repeatability as Current resource file to each resource file in storage resource packet
Judgement.
Wherein, described specifically to can be advertising programme packet to storage resource packet, each advertising programme packet will include many
Resource file, such as video file, audio file, picture file etc..Different advertising programme packets may include it is identical certain
A resource file, therefore, in order to avoid server-side carries out each resource file to repeat storage, when receiving to storage resource packet
When, for each resource file in storage resource packet, judge whether Current resource file was stored, if
Through being stored, then no longer carry out repeating storage, meanwhile, in order to ensure stored Current resource file with described wait deposit
Inclusion relation between storage resource packet then establishes Current resource file and institute when determining that Current resource file had been stored
It states to establish mapping relations between storage resource packet, includes the Current resource file to storage resource packet so that characterization is described.
It is illustratively, described to judge whether Current resource file was stored, comprising:
Judge with the presence or absence of resource file identical with the identification number of Current resource file in the database of server-side, if depositing
, it is determined that Current resource file was stored, otherwise, it determines Current resource file was not stored.The resource
File includes at least one of picture file, video file, audio file and document files.
Step 120 judges whether Current resource file was stored, if so, continuing to execute step 130, otherwise
Execute step 140.
If step 130, the Current resource file were stored, establish it is described to storage resource packet with deposited
Mapping relations between the Current resource file of storage.
If step 140, the Current resource file were not stored, Current resource file progress is independently deposited
Storage, and establish described to the mapping relations between storage resource packet and the Current resource file
It is to guarantee when new in storage resource packet to the purpose that the Current resource file carries out separate storage
When comprising the Current resource file, the Current resource file and described new to reflecting between storage resource packet can be established
Penetrate relationship.
A kind of resource storage scheme provided in this embodiment, when receiving when storage resource packet, for described wait store
Each resource file in resource packet, judges whether Current resource file was stored;If the Current resource file is
Through being stored, then establish described to the mapping relations between storage resource packet and the stored Current resource file;
If the Current resource file was not stored, separate storage is carried out to the Current resource file, and establish it is described to
Mapping relations between storage resource packet and the Current resource file avoid server-side and carry out repeating to deposit to same asset
Storage, realizes the effective use to server-side memory space.
Embodiment two
Fig. 2 is a kind of resource downloading method flow diagram provided by Embodiment 2 of the present invention, money provided in this embodiment
Source method for down loading is applied to intelligent terminal, and the intelligent terminal is used to download resource from corresponding server-side and shows the money
Source, the intelligent terminal specifically can be advertisement machine, commercial affairs customize intelligent TV set and other are used to the information such as publicize, impart knowledge to students
The display terminal with large screen of publication.The resource downloading method is relied on according to resource storage method described in above-described embodiment
The resource stored.Referring specifically to shown in Fig. 2, a kind of resource downloading method provided in this embodiment includes the following steps:
Step 210, when receiving download instruction, current money is determined based on each resource file in resources to be downloaded packet
Source file.
Wherein, each resource file in the resources to be downloaded packet successively will carry out repeatability as Current resource file
Judgement.
Step 220 judges whether the Current resource file has existed, and if it exists, 230 is thened follow the steps, if not depositing
Thening follow the steps 240.
It is illustratively, described to judge whether Current resource file has existed, comprising:
Judge whether Current resource file has existed according to the MD5 value of Current resource file;Each resource file has
Unique MD5 value, therefore can judge whether Current resource file is already present on intelligent end based on the MD5 value of Current resource file
End, and if it exists, repeated downloads no longer then are carried out to Current resource file, to save flow bandwidth, while being improved to intelligent terminal
The effective use of memory space.
Step 230 is no longer downloaded Current resource file, terminates process.
Step 240 downloads the Current resource file from server-side.
Illustratively, described to include: from the server-side downloading Current resource file
Described in being determined between the resources to be downloaded packet and the Current resource file in the mapping relations of server-side
The download address of Current resource file;
The Current resource file is downloaded from the download address.
Further, after the download address downloading Current resource file, further includes:
The integrality of Current resource file is verified.
On the basis of the above embodiments, resource downloading method provided in this embodiment receives download instruction by working as
When, for each resource file in resources to be downloaded packet, judge whether Current resource file has existed;If so, no longer
Current resource file is downloaded, otherwise, the technological means of the Current resource file is downloaded from server-side, is realized identical
Resource file only downloads primary purpose, effectively saves the memory space of network bandwidth and intelligent terminal.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for resource system that the embodiment of the present invention three provides, and the resource system includes clothes
Be engaged in end 310 and intelligent terminal 320, wherein the server-side 310 is used for: when receiving when storage resource packet, for it is described to
Each resource file in storage resource packet, judges whether Current resource file was stored;If the Current resource text
Part was stored, then established the mapping between storage resource packet and the stored Current resource file and close
System;If the Current resource file was not stored, separate storage is carried out to the Current resource file, and described in foundation
To the mapping relations between storage resource packet and the Current resource file.When server-side 310 needs to store new resource packet,
For each resource file in resource packet, the mapping established between the stored resource file of resource packet and server-side is closed
System, and indirect all resource files by resource packet directly carry out copy storage, the resource file not stored for server-side,
The independent storage for then carrying out resource file avoids the repetition storage of same asset file, improves server-side memory space
Effective use.
The intelligent terminal 320, for when receiving download instruction, for each resource text in resources to be downloaded packet
Part, judges whether Current resource file has existed;If so, being no longer downloaded to Current resource file, otherwise, from service
Download the Current resource file in end.
On the basis of the above embodiments, resource system provided in this embodiment, avoid server-side to same asset into
Row repeats to store, and realizes the effective use to server-side memory space, meanwhile, intelligent terminal is realized to same asset file
Primary purpose is only downloaded, the memory space of network bandwidth and intelligent terminal is effectively saved.
Example IV
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention four provides.Fig. 4, which is shown, to be suitable for being used in fact
The block diagram of the example electronic device 12 of existing embodiment of the present invention.The electronic equipment 12 that Fig. 4 is shown is only an example, no
The function and use scope for coping with the embodiment of the present invention bring any restrictions.
As shown in figure 4, electronic equipment 12 is showed in the form of universal computing device.The component of electronic equipment 12 may include
But be not limited to: one or more processor or processing unit 16, system storage 28, connect different system components (including
System storage 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be electric
The usable medium that sub- equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 30 and/or cache memory 32.Electronic equipment 12 may further include other removable/not removable
Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for read and write can not
Mobile, non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").Although not shown in fig 4, Ke Yiti
For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light
The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver
It can be connected by one or more data media interfaces with bus 18.Memory 28 may include that at least one program produces
Product, the program product have batch processing module, these program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 40 with batch processing module 42, can store in such as memory 28, such journey
Sequence module 42 including but not limited to operating system, one or more application program, other program modules and program data, this
It may include the realization of network environment in each of a little examples or certain combination.Program module 42 usually executes institute of the present invention
Function and/or method in the embodiment of description.
Electronic equipment 12 can also be with one or more external equipments 14 (such as camera, keyboard, sensing equipment, display
Device 24 etc.) communication, the equipment interacted with the electronic equipment 12 can be also enabled a user to one or more to be communicated, and/or with
Any equipment (such as network interface card, the modulatedemodulate that the electronic equipment 12 is communicated with one or more of the other calculating equipment
Adjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 22.Also, electronic equipment 12 can be with
By network adapter 20 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.As shown, network adapter 20 is communicated by bus 18 with other modules of electronic equipment 12.It answers
When understanding, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 12, including but unlimited
In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number
According to backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and
Data processing, such as resource storage method provided by any embodiment of the invention, resource downloading method, the resource storage side
Method includes:
When receiving when storage resource packet, current money is determined based on each resource file in storage resource packet
Source file;
Judge whether the Current resource file was stored;
If the Current resource file was stored, establish it is described to storage resource packet and it is stored described in
Mapping relations between Current resource file;
If the Current resource file was not stored, separate storage is carried out to the Current resource file, and build
It is vertical described to the mapping relations between storage resource packet and the Current resource file.
The resource downloading method includes:
When receiving download instruction, Current resource file is determined based on each resource file in resources to be downloaded packet;
Judge whether the Current resource file has existed;If so, no longer Current resource file is downloaded, it is no
Then, the Current resource file is downloaded from server-side.
Embodiment five
The embodiment of the present invention five additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
Resource storage method and resource downloading method provided by any embodiment of the invention, institute are realized when program is executed by processor
Stating resource storage method includes:
When receiving when storage resource packet, current money is determined based on each resource file in storage resource packet
Source file;
Judge whether the Current resource file was stored;
If the Current resource file was stored, establish it is described to storage resource packet and it is stored described in
Mapping relations between Current resource file;
If the Current resource file was not stored, separate storage is carried out to the Current resource file, and build
It is vertical described to the mapping relations between storage resource packet and the Current resource file.
The resource downloading method includes:
When receiving download instruction, Current resource file is determined based on each resource file in resources to be downloaded packet;
Judge whether the Current resource file has existed;If so, no longer Current resource file is downloaded, it is no
Then, the Current resource file is downloaded from server-side.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on remote computer or server-side completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.