CN116132543A - Picture resource processing method and device, storage medium and electronic device - Google Patents

Picture resource processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116132543A
CN116132543A CN202310109712.6A CN202310109712A CN116132543A CN 116132543 A CN116132543 A CN 116132543A CN 202310109712 A CN202310109712 A CN 202310109712A CN 116132543 A CN116132543 A CN 116132543A
Authority
CN
China
Prior art keywords
event
picture
pictures
target
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310109712.6A
Other languages
Chinese (zh)
Inventor
张靖磊
朱龙
丁林超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202310109712.6A priority Critical patent/CN116132543A/en
Publication of CN116132543A publication Critical patent/CN116132543A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application discloses a processing method and device of picture resources, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring a group of event pictures to be combined, which are reported by a group of detection devices, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined; performing picture merging operation on the group of event pictures to be merged to obtain a picture merging file; and uploading the picture merging file to a first server by calling a first uploading interface of the first server. According to the method and the device for processing the picture resources, the problem that cloud storage performance is reduced due to the fact that the calling frequency of the picture uploading interface is high in a processing method of the picture resources in the related technology is solved.

Description

Picture resource processing method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of image processing, and in particular, to a method and apparatus for processing a picture resource, a storage medium, and an electronic apparatus.
Background
Currently, a front-end device (e.g., a front-end camera) with an image acquisition function may detect a preset event (a preset event triggering an alarm, for example, a frame change, a human-shaped object appears), and when detecting that the preset event occurs, the front-end device acquires an event picture (e.g., an alarm picture), where the event picture records a frame at the time of the event occurrence, and uploads the event picture to the cloud together with an event message. The cloud end stores the event pictures in cloud storage, and a user can view the event pictures stored in the cloud storage through terminal equipment of the user.
In the related art, management of event pictures in cloud storage is generally achieved by adopting an SDK or interface call mode of an integrated cloud storage provider, for example, picture uploading, picture downloading, picture deleting and the like. However, when uploading event pictures, a picture uploading interface needs to be called once to upload an event picture, and as the calling frequency increases, a large number of calling operations affect the performance of cloud storage.
As can be seen from the above, the processing method of the picture resource in the related art has the problem of reduced cloud storage performance caused by high call frequency of the picture uploading interface.
Disclosure of Invention
The embodiment of the application provides a processing method and device of picture resources, a storage medium and an electronic device, and aims to at least solve the problem that timeliness of adjustment of a shielding area is poor due to time and labor consumption of manual operation in the processing method of the picture resources in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for processing a picture resource, including: acquiring a group of event pictures to be combined, which are reported by a group of detection devices, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined; performing picture merging operation on the group of event pictures to be merged to obtain a picture merging file; and uploading the picture merging file to a first server by calling a first uploading interface of the first server.
According to another aspect of the embodiments of the present application, there is further provided a processing apparatus for a picture resource, including: the first acquisition unit is used for acquiring a group of event pictures to be combined, which are reported by a group of detection devices, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined; the execution unit is used for executing the picture merging operation on the group of event pictures to be merged to obtain a picture merging file; and the first uploading unit is used for uploading the picture merging file to the first server by calling a first uploading interface of the first server.
In an exemplary embodiment, the first acquisition unit includes: the receiving module is used for receiving a plurality of event pictures which are reported by a plurality of detection devices and carry corresponding event tokens in preset time, wherein each detection device in the plurality of detection devices corresponds to at least one event picture in the plurality of event pictures, each event picture in the plurality of event pictures is reported by the detection device corresponding to each event picture, and the event token corresponding to each event picture is used for identifying the preset event corresponding to each event picture; the dividing module is used for dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to the event pictures, wherein the group of event pictures to be combined is one group of event pictures in the plurality of groups of event pictures.
In an exemplary embodiment, an event token corresponding to an event picture contains a set of identification information including at least one of: a server address corresponding to a picture server to which the event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the event picture belongs; the dividing module includes: and the dividing sub-module is used for dividing the event pictures with the same group of identification information contained in the corresponding event tokens into a group of event pictures to obtain the plurality of groups of event pictures.
In an exemplary embodiment, the set of identification information in the event token corresponding to each to-be-merged event picture is a set of target identification information, and the apparatus further includes: the second obtaining unit is used for obtaining a first event picture carrying a first event token, which is reported by the target detection equipment, after the picture merging file is uploaded to the first server by calling a preset uploading interface of the first server, wherein the first event picture is an event picture corresponding to the preset event detected by the target detection equipment once; and the second uploading unit is used for uploading the first event picture to the first server by calling a second uploading interface of the first server under the condition that the group of identification information contained in the first event token is the group of target identification information so as to write the first event picture into the picture merging file.
In an exemplary embodiment, the apparatus further comprises: the updating unit is configured to update, after the image merging operation is performed on the set of to-be-merged event images to obtain an image merging file, an image record corresponding to each to-be-merged event image in a target index file according to an event token corresponding to each to-be-merged event image, where the event token corresponding to each to-be-merged event image is reported together with each to-be-merged event image, and the image record corresponding to each to-be-merged event image is used to record a correspondence between the event token corresponding to each to-be-merged event image, a file path of the image merging file in the first server, and offset information of each to-be-merged event image in the image merging file.
In an exemplary embodiment, the apparatus further comprises: the receiving unit is used for receiving a picture downloading request sent by the target device after the picture merging file is uploaded to the first server by calling a preset uploading interface of the first server, wherein the picture downloading request is used for requesting to download a second event picture, the second event picture belongs to the group of event pictures to be merged, and the picture downloading request carries a second event token corresponding to the second event picture; the searching unit is used for searching a picture record corresponding to the second event picture from the target index file according to the second event token; the analysis unit is used for analyzing a target file path of the picture merging file in the first server and target offset information of the second event picture in the picture merging file from the target picture record under the condition that the target picture record corresponding to the second event picture is found; a third obtaining unit, configured to obtain, according to the target file path and the target offset information, the second event picture from the first server; and responding to the picture downloading request, and sending the second event picture to the target equipment.
In an exemplary embodiment, an event token corresponding to an event picture contains a set of identification information including at least one of: a server address corresponding to a picture server to which the event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which the reporting time of the preset event corresponding to the event picture belongs; the group of identification information in the event tokens corresponding to each event picture to be combined is a group of target identification information; the file identification of the target index file is spliced by the group of target identification information; the apparatus further comprises: a determining unit, configured to determine, according to the set of target identification information in the second event token, a file identification of the target index file before searching, according to the second event token, a picture record corresponding to the second event picture from the target index file; and the downloading unit is used for downloading the target index file from the first server according to the file identification of the target index file.
In an exemplary embodiment, the apparatus further comprises: the display unit is used for displaying an event message list on a display interface of the target equipment before receiving a picture downloading request sent by the target equipment, wherein the event message list is a list of event messages corresponding to one or more times of preset events detected by target detection equipment matched with the target equipment; a fourth obtaining unit, configured to obtain URL information corresponding to a target event message in the event message list in response to a selection operation performed on the target event message, where the URL information is generated according to the second event token corresponding to the target event message, and the second event token is used to identify a target secondary preset event detected by the target detection device and corresponding to the target event message; and the sending unit is used for sending the picture downloading request to a second server, wherein the picture downloading request comprises the URL information.
According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described processing method of picture resources when running.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the processing method of the picture resource by using the computer program.
In the embodiment of the application, a mode of uploading a plurality of event pictures to cloud storage after merging is adopted, and a group of event pictures to be merged, which are reported by a group of detection devices, are obtained, wherein each detection device in the group of detection devices corresponds to at least one event picture to be merged in the group of event pictures to be merged, and each event picture to be merged in the group of event pictures to be merged is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be merged; performing picture merging operation on a group of event pictures to be merged to obtain a picture merging file; the first uploading interface of the first server is called to upload the picture merging file to the first server, and as the received event pictures are subjected to picture merging, compared with a mode of directly uploading each event picture independently, the times of picture uploading can be reduced, the purpose of reducing the calling frequency of the picture uploading interface can be achieved through the processing mode of the picture resources, the technical effect of improving cloud storage performance is achieved, and the problem that cloud storage performance is reduced due to the fact that the calling frequency of the picture uploading interface is high in the processing method of the picture resources in the related art is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative method of processing picture resources according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method for processing a picture resource according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a hardware environment of another alternative method of processing picture resources according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative method of processing a picture resource according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another alternative method of processing a picture resource according to an embodiment of the present application;
FIG. 6 is a flow chart of another alternative method of processing a picture resource according to an embodiment of the present application;
FIG. 7 is a flow chart of yet another alternative method of processing a picture resource according to an embodiment of the present application;
FIG. 8 is a schematic diagram of yet another alternative method of processing a picture resource according to an embodiment of the present application;
FIG. 9 is a block diagram of an alternative processing device for picture resources according to an embodiment of the present application;
fig. 10 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, a processing method of a picture resource is provided. Alternatively, in the present embodiment, the above-described processing method of the picture resource may be applied to a hardware environment including the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services, etc.) to the terminal device 102 or clients installed on the terminal device 102, and a database may be provided on the server 104 or independent of the server 104, for providing data storage services to the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. Alternatively, the terminal device 102 may include a detection device (event detection device) and a receiving terminal, where the detection device may be a detection device (may be a security device) with a video monitoring function, such as a camera, and the receiving terminal may be a terminal device corresponding to the detection device, and the terminal device may perform information receiving by a client thereon, and the client may be an APP (Application), and the like.
The processing method of the picture resource in the embodiment of the present application may be executed by the server 104, may be executed by the terminal device 102, or may be executed by both the server 104 and the terminal device 102. Taking the execution of the server 104 as an example, fig. 2 is a schematic flow chart of an optional method for processing a picture resource according to an embodiment of the application, as shown in fig. 2, the flow of the method may include the following steps:
step S202, a group of event pictures to be combined, which are reported by a group of detection devices, are obtained, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined.
The processing method of the picture resource in the embodiment can be applied to writing the event picture reported by the detection equipment into the cloud storage scene. The detection device may be a device with a video monitoring function, such as a camera, and may be referred to as a front-end device. The event picture may be a picture corresponding to a preset detection event. Here, the detection event may be a screen change, a movement of a humanoid subject, the presence of a large-area flame, or the like. The detection event may also be referred to as an alarm event and, correspondingly, the event picture may be referred to as an alarm picture. The processing method of the picture resources can be applied to the fields of households, shops and the like, and helps household and enterprise users to simply add equipment through the APP, so that video monitoring functions of security equipment such as real-time video preview, alarm message notification, alarm video watching and the like are realized. In different scenarios, the set detection events may differ.
Taking the detection equipment as a front-end camera and the detection event as an alarm event as an example, when the alarm event occurs, a local image (namely an alarm picture) and local video data are acquired through the front-end camera, and the alarm picture records a picture of the occurrence time of the event at the moment and is uploaded to a cloud together with an alarm message. The cloud end stores the alarm pictures in cloud storage, and a user can view the alarm pictures stored in the cloud storage through the corresponding APP.
Cloud storage is a mode of online storage (i.e., data is stored on multiple virtual servers, which are usually hosted by a third party, rather than on dedicated servers), and when various files are stored through cloud storage, uploading of the data is usually completed through an SDK (Software Development Kit ) or an interface call of a cloud storage provider. The cloud storage SDK generally includes file management methods such as file upload, file download, and file deletion, and the file upload generally uses HTTP (Hyper Text Transfer Protocol ) PUT method (a method of sending data to a server) to store resources in the cloud storage, and the file download generally uses HTTP GET method (a method of downloading data from a database) to read resources from the cloud storage to the local. The usage fees for cloud storage generally include cloud storage space storage fees, traffic fees, and request fees. The charging items of the request fee include the number of times of PUT type request, the number of times of GET type request, the cold archive data retrieval request fee, and the like.
However, as the mass devices are accessed, when the alarm data received by the cloud platform is increased, the cost of the PUT type is increased along with the increase of the request times, so that the cost brought by the cloud storage API (Application Programming Interface ) is also increased. Meanwhile, a large number of PUT operations also affect the performance of cloud storage itself.
In order to at least partially solve the above technical problems, in this embodiment, multiple alarm pictures may be combined and uploaded, so as to reduce the number of times of uploading the alarm pictures, and further reduce the call frequency of the picture uploading interface, so as to achieve the purpose of reducing the influence on cloud storage performance.
For the data reported by the detection device, a server for processing the message and a server for processing the picture can be respectively arranged. As shown in fig. 3, the cloud video recording system may include an alarm message server, an alarm picture reading proxy server, a database, and a cloud storage. The server for processing the message can be an alarm message server for receiving the alarm message reported by the front-end equipment and completing the functions of message pushing and the like, and the server for processing the picture can be divided into an alarm picture server and an alarm picture reading proxy server, wherein the alarm picture server is used for receiving the alarm picture reported by the front-end equipment and completing the picture merging and uploading cloud storage function, and the alarm picture reading proxy server is used for receiving the front-end application request and completing the picture downloading function. The database can be used for storing alarm message records and alarm picture records corresponding to the alarm messages. The cloud storage can be used for storing the binary data of the pictures and can also be used for storing index file data after the pictures are combined.
In this embodiment, the alarm image server may obtain a set of event images to be combined reported by a set of detection devices. Here, each detection device in the set of detection devices corresponds to at least one event picture to be combined in the set of event pictures to be combined, and each event picture to be combined in the set of event pictures to be combined may be an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined. The preset event may be a preset event (i.e., the detection event) that needs to be subjected to alarm processing, and the event picture is the alarm picture.
The group of detection devices and the group of event pictures to be combined can be in one-to-one relationship or one-to-multiple relationship, namely, each detection device in the group of detection devices can correspond to one event picture to be combined in the group of event pictures to be combined or can correspond to a plurality of event pictures to be combined in the group of event pictures to be combined. The preset events can comprise various events, and the preset events corresponding to different event pictures to be combined can be the same or different. The time for acquiring a group of event pictures to be combined may be the same or different, which is not limited in this embodiment.
Step S204, executing the picture merging operation on a group of event pictures to be merged to obtain a picture merging file.
In this embodiment, a picture merging operation may be performed on an acquired group of event pictures to be merged to obtain a picture merging file. Here, the picture merging operation may be performed in the aforementioned alarm picture server. In order to ensure the instantaneity of the alarm message and the alarm picture, improve the efficiency of message pushing and picture display, the triggering condition for executing the picture merging operation can be time, the timing is started when the first picture of the event to be merged uploaded by the detection equipment is received, and the picture merging operation is started after the preset time is reached.
Alternatively, the above-mentioned picture merging operation may be a merging of binary data of each event picture to be merged, where each event picture is merged with a different offset in a picture merging file. The file format of the picture merging file may be DAV (DataAudio Video), or may be other file formats capable of containing a plurality of pictures.
Optionally, the image merging operation performed on a group of event images to be merged may be to merge all the event images to be merged in the group of event images to be merged into one image merging file, or may be to divide the event images to be merged in the group of event images to be merged into multiple parts to respectively synthesize image merging files, where the number of the merged image merging files is smaller than the number of the event images to be merged contained in the group of event images to be merged.
Step S206, the image merging file is uploaded to the first server by calling a first uploading interface of the first server.
After the picture merging operation is completed, the picture merging file can be uploaded to the first server by calling a first uploading interface of the first server. Here, the first server may be a virtual server hosted by a third party, that is, the cloud storage, and the first uploading interface may be a call interface for uploading the picture, or may be a resource uploading interface matched with a file type of the picture merging file. The call method may be the HTTP PUT method, or may be another method, which is not limited in this embodiment.
Through the steps, a group of event pictures to be combined, which are reported by a group of detection devices, are obtained, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined; performing picture merging operation on a group of event pictures to be merged to obtain a picture merging file; the method for processing the picture resources in the related technology solves the problem that cloud storage performance is reduced due to high calling frequency of the picture uploading interface, and improves the cloud storage performance by calling the first uploading interface of the first server to upload the picture merging file to the first server.
In an exemplary embodiment, obtaining a set of event pictures to be combined reported by a set of detection devices includes:
s11, receiving a plurality of event pictures which are reported by a plurality of detection devices and carry corresponding event tokens in preset time, wherein each detection device in the plurality of detection devices corresponds to at least one event picture in the plurality of event pictures, each event picture in the plurality of event pictures is reported by the detection device corresponding to each event picture, and the event token corresponding to each event picture is used for identifying a preset event corresponding to each event picture;
and S12, dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to the event pictures, wherein one group of event pictures to be combined is one group of event pictures in the plurality of groups of event pictures.
Considering that when more detection devices are provided, the event pictures and the preset events reported by each detection device are easy to be confused, in order to improve the resolvability of each event picture and the preset event, an event token (i.e. token) can be generated for each preset event and the corresponding event picture, so that the event pictures can be conveniently combined and downloaded. An alarm message may be associated with a picture, and the message and picture may be multiplexed with the same token.
In this embodiment, a plurality of event pictures carrying corresponding event tokens and reported by a plurality of detection devices may be received within a preset time. Here, each of the plurality of detection apparatuses corresponds to at least one of the plurality of event pictures, and each of the plurality of event pictures may be reported by the detection apparatus corresponding to each of the event pictures. The event token corresponding to each event picture may be used to identify a preset event corresponding to each event picture.
Alternatively, the event token may be generated by the alarm message server upon receipt of an event message (which may be an alarm message) of a preset event reported by the detection device and fed back to the detection device. Correspondingly, the detection device may report the preset event first, and report the event picture and the event token together after receiving the event token. The event token may include a time identifier, which may be used to identify a detection time of the preset event, and may also be used to identify a reception time of the event message.
For ease of distinction, the event tokens corresponding to different preset events may be different, while the designated portions of event tokens generated for the same time period (e.g., the aforementioned time identification) may be the same. The plurality of event pictures may be divided into a plurality of groups of event pictures according to the event token corresponding to each event picture. Here, the aforementioned set of event pictures to be merged may be one set of event pictures among a plurality of sets of event pictures.
Optionally, the division of the event pictures into the picture groups may be performed according to at least part of the information in the event token, for example, the event pictures with the same or matched information in the designated information segment are divided into the same group of event pictures, so as to obtain multiple groups of event pictures. For each group of event pictures in the plurality of groups of event pictures, the picture merging operation can be performed respectively, each group of event pictures is merged into a picture merging file, and the picture merging file obtained by merging is uploaded to the first server.
According to the embodiment, the event pictures are divided into the plurality of groups of event pictures according to the event tokens, so that the flexibility of processing the event pictures can be improved.
In an exemplary embodiment, since the preset event occurs randomly, there may be multiple event pictures reported by multiple detection devices during the preset time, and furthermore, the alarm picture servers that process different event pictures may also be different. In this embodiment, the event token may include a plurality of fields, and different types of information may be written in different fields, where a set of identification information may be included, where a set of identification information may include at least one of: the method comprises the steps of reporting a picture to a picture server, a server address corresponding to the picture server, a device group identifier corresponding to a detection device for reporting the picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the picture.
Alternatively, the device group identifier may be determined according to a Serial Number (SN), and the devices are uniformly divided into a plurality of groups to be managed by a mode calculation, and, taking a mode 16 as an example, the device group identifier corresponding to the detecting device corresponding to the event picture may be determined by MD5 (SN)% 16 (MD 5 herein, that is, message-Digest Algorithm is a cryptographic hash function). The time slice may be one cut time slice for 5 seconds, for example, starting from 1664266653 seconds, all the time slices corresponding to the event pictures received in the following 5 seconds may be 1664266653.
For example, take a token of 1.1.1.1_01_1664266653_yyy as an example, where 1.1.1.1 identifies the server IP address, 01 identifies MD5 (SN)% 16, 1664266653 identifies the corresponding time slice, and underline is used to splice, yyy is used to distinguish different event pictures in a set of event pictures. As shown in fig. 4, a picture server ip+md5 (SN)% 16+ time slice manner is used to generate a token of each picture, and a picture merging file may simultaneously include a plurality of picture data, where the plurality of picture data may correspond to a plurality of tokens, a file path corresponding to each picture may be the same, and an offset corresponding to each picture may be different.
Correspondingly, dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to each event picture, including:
s21, dividing a group of event pictures with the same identification information contained in the corresponding event token in the plurality of event pictures into a group of event pictures, and obtaining a plurality of groups of event pictures.
In this embodiment, a group of event pictures with the same identification information contained in the corresponding event token in the plurality of event pictures may be divided into a group of event pictures, so as to obtain a plurality of groups of event pictures. For a group of event pictures to be combined, a group of identification information contained in each event picture to be combined can be the same, and can be a group of target identification information.
According to the embodiment, the event pictures corresponding to the event tokens with the same identification information are divided into the group of event pictures, so that the efficiency of dividing the pictures can be improved, and the efficiency of merging the event pictures is further improved.
In an exemplary embodiment, the set of identification information in the event token corresponding to each event picture to be merged is a set of target identification information. Correspondingly, after uploading the picture merging file to the first server by calling a preset uploading interface of the first server, the method further comprises the following steps:
S31, acquiring a first event picture carrying a first event token, which is reported by target detection equipment, wherein the first event picture is an event picture corresponding to a preset event detected by the target detection equipment;
s32, when the group of identification information contained in the first event token is the group of target identification information, uploading the first event picture to the first server by calling a second uploading interface of the first server so as to write the first event picture into the picture merging file.
Considering the delay of information transmission between devices, the event pictures containing the same set of identification information may not be all received within a preset time, for example, the duration of the preset time may be the duration of one time slice (for example, 5 s), and for a certain set of identification information, due to the existence of the transmission delay, the time difference between the time when the corresponding event token receives the first event picture containing the set of identification information and the time when the corresponding event token receives the last event picture containing the set of identification information may be longer than the duration of one time slice or may be shorter than the duration of one time slice.
In order to improve the efficiency of image processing, the image merging operation may be performed on the event images (i.e., a group of event images to be merged) received in the preset time, where the event images corresponding to the event tokens include a group of target identification information, to obtain an image merging file, and the image merging file is uploaded to the first server, where the preset time may be a period of time after the first event image to be merged, where the event token corresponding to the event token includes a group of target identification information, is received, and the period of time is a preset duration of time.
After uploading the picture merging file to the first server, a first event picture carrying a first event token and reported by the target detection equipment can be acquired. Here, the first event picture may be an event picture corresponding to a one-time preset event detected by the object detection device. If the group of identification information contained in the first event token is the group of target identification information, the first event picture can be uploaded to the first server by calling a second uploading interface of the first server so as to be written into the picture merging file. Here, the second uploading interface may be the same calling interface as the first uploading interface, or may be a different calling interface from the first uploading interface, which is not limited in this embodiment.
After receiving the first event picture, the first server determines a picture merging file corresponding to the first event picture based on the reference information uploaded together with the first event picture, and writes the first event picture into the picture merging file, for example, into the last of the picture merging file. In addition, an index file corresponding to the picture-merging file may be updated.
According to the embodiment, the event pictures are directly written into the picture merging file with the same event token, so that the picture merging efficiency can be improved.
In an exemplary embodiment, after performing a picture merging operation on a group of event pictures to be merged to obtain a picture merging file, the method further includes:
and S41, updating a picture record corresponding to each to-be-combined event picture in the target index file according to the event token corresponding to each to-be-combined event picture, wherein the event token corresponding to each to-be-combined event picture is reported together with each to-be-combined event picture, and the picture record corresponding to each to-be-combined event picture is used for recording the corresponding relation among the event token corresponding to each to-be-combined event picture, the file path of the picture combining file in the first server and the offset information of each to-be-combined event picture in the picture combining file.
In order to facilitate the searching and downloading of each event picture uploaded in the cloud storage, a picture merging file to which the event picture belongs and the position of the event picture in the picture merging file can be recorded. In the related art, the meta-server and the file index can be managed through algorithms such as hash, and the meta-data server cluster adopts a distributed storage system, so that the merged data needs to be associated and stored by the meta-data server cluster.
In this embodiment, the index file may be used to record information about the event picture, which may be a lightweight index management manner. The related information of the event pictures can be used for indicating the affiliated picture merging files, the positions of the event pictures in the picture merging files and the like, and the related information of each event picture can be a picture record corresponding to one event picture.
The event records corresponding to all the event pictures can be written into one index file. In order to improve efficiency of information searching, when generating the index file, the corresponding index file may be generated according to a set of identification information contained in the corresponding event token, and a file name of the index file may be spliced by the set of identification information. For a group of event pictures to be combined, the index file corresponding to the event pictures to be combined can be a target index file, and the file name of the target index file is spliced by a group of target identification information.
Optionally, the target index file may be generated by the alarm picture server and then uploaded to the first server, and because the file name of the index file is obtained by splicing a set of target identification information, when searching and downloading the picture, the index file may be directly searched by a set of identification information corresponding to the event picture, so as to obtain the picture record information in the index file. By the method, rapid addressing in picture merging can be realized without depending on the assistance of an index storage system.
In this embodiment, each to-be-merged event picture may be reported together with its corresponding event token. And updating the picture record corresponding to each to-be-combined event picture in the target index file according to the event token corresponding to each to-be-combined event picture. The picture record corresponding to each to-be-merged event picture may be used to record a correspondence between the event token corresponding to each to-be-merged event picture, a file path of the picture merging file in the first server, and offset information of each to-be-merged event picture in the picture merging file.
For example, taking the target index file as the picture index file as an example, the picture mapping principle may be as shown in fig. 5, and the picture index file may include a serial number SN of a picture, a token corresponding to each picture, a file path of each picture, and an offset (may include a start offset and an end offset) of each picture. The mapping relation recorded in the index file can be used for positioning a specific merging file and a corresponding offset, so that effective positioning of the picture is realized.
Optionally, the correspondence between the event token corresponding to each to-be-combined event picture and the offset information of each to-be-combined event picture in the picture combining file, which is recorded in the target index file, may be recorded in the target index file after the combining of the to-be-combined event pictures is completed. The file path of the picture combining file recorded in the target index file in the first server may be updated in the target index file by the alarm message server according to the file path of the picture combining file stored in the first server after uploading the picture combining file to the first server. Correspondingly, the target index file can be uploaded to the cloud storage after the image merging file is uploaded.
Here, the target index file may be generated after obtaining the picture-merging file, and the generated target index file may be an empty index file. And updating the picture record corresponding to each to-be-combined event picture to the target index file once to obtain a picture record corresponding to each to-be-combined event picture. For an event picture, such as the first event picture, which needs to be updated into a corresponding picture merging file, a corresponding picture record may be updated into a corresponding index file, where the corresponding index file may be stored locally, or may be downloaded locally by cloud storage (e.g., the first server). For the latter, after updating the index file, the updated index file may be re-uploaded to cloud storage. In addition, the corresponding picture record can be sent to the cloud storage, and the cloud storage updates the corresponding index file.
For example, taking an event picture as an alarm picture, as shown in fig. 6, the uploading flow of the alarm picture may be as follows:
in step 602, the device triggers the pushing of an alarm message to the cloud service.
The device detects that an alarm message exists, triggers the alarm message and pushes the alarm message to the cloud service.
Step 604, replying to the device alarm picture server address.
The cloud allocates a picture server address and generates a token.
Step 606, receiving an alarm picture reported by the device.
And the cloud end receives the alarm picture reported by the equipment.
Step 608, merging the pictures and writing the pictures into cloud storage.
And the cloud end performs picture data merging and uploading to cloud storage according to a certain rule.
Step 610, updating the index file corresponding to the picture according to the token.
And updating the index file to the corresponding index file according to the rule corresponding to the token.
According to the embodiment, the related information of the combined event pictures is recorded through the index file, so that the searching efficiency of the pictures can be improved, and the pictures can be rapidly positioned.
In an exemplary embodiment, after uploading the picture-in-file to the first server by calling a preset upload interface of the first server, the method further includes:
s51, receiving a picture downloading request sent by target equipment, wherein the picture downloading request is used for requesting to download a second event picture, the second event picture belongs to a group of event pictures to be combined, and the picture downloading request carries a second event token corresponding to the second event picture;
S52, searching a picture record corresponding to the second event picture from the target index file according to the second event token;
s53, under the condition that a target picture record corresponding to the second event picture is found, analyzing a target file path of the picture merging file in the first server and target offset information of the second event picture in the picture merging file from the target picture record;
s54, acquiring a second event picture from the first server according to the target file path and the target offset information;
and S55, responding to the picture downloading request, and sending the second event picture to the target equipment.
When a user needs to view an event picture (i.e., a second event picture) of a certain preset event, the user can send a corresponding picture downloading request through a target device running a target Application (APP), and the event picture is downloaded from a cloud storage (i.e., a first server). Here, the target device may be an intelligent device bound to a certain detection device, where the picture download request is used to request downloading of a second event picture, where the second event picture belongs to a group of event pictures to be merged.
In this embodiment, the alarm picture reading proxy server may receive a picture download request sent by the target device. Here, the alarm picture reading proxy server and the alarm picture server may both belong to cloud services, and are the same server or may be different servers. In order to facilitate rapid determination of the event picture requested for downloading, the picture download request may carry a second event token corresponding to the second event picture. Based on the second event token, a picture record corresponding to the second event picture can be quickly found from the target index file.
Alternatively, the second event token carried in the picture download request may be obtained by the target device from the aforementioned database. The second event token may be carried in a manner that the second event token carries an indication address, such as URL (Uniform Resource Locator ) information, corresponding to the second event picture in the picture download request. Here, the second event token may be carried in the picture download request as a whole, or may be split into multiple parts to be carried in the picture download request, for example, by splitting the information of different parts in the second event token by underlining or other special characters.
Under the condition that a target picture record corresponding to the second event picture is searched, a target file path of the picture merging file in the first server and target offset information of the second event picture in the picture merging file can be analyzed from the target picture record; according to the target file path and the target offset information, a second event picture can be acquired from the first server, and the second event picture is sent to the target device in response to the picture downloading request. That is, the second event picture is downloaded from the first server and transmitted to the target device according to the target file path and the target offset information.
For example, taking the target device as a receiving terminal, as shown in fig. 7, the downloading flow of the picture may be as follows:
step S702, a picture downloading request is received.
And receiving a picture downloading request initiated by a terminal (such as an APP).
Step S704, obtaining a picture index file according to the token in the URL.
The corresponding picture index file (here, the file name of the picture index file is parsed) is parsed from the token in the download URL.
Step S706, an index file is acquired from the cloud storage.
And acquiring a corresponding picture index file from the cloud storage, and downloading the picture index file to a local memory.
In step S708, the picture address and offset are resolved from the index file.
The picture index file is parsed from the local memory, and the corresponding merged picture address (i.e., file path) and offset (including start offset and end offset) are parsed.
Step S710, downloading the picture from the cloud storage.
And downloading the picture data from the cloud storage according to the combined picture address and the offset.
Step S712, return to the terminal.
And returning the picture data to the terminal.
According to the embodiment, the event token is used for completing downloading of the event pictures, so that the positioning efficiency of the pictures to be downloaded can be improved, and the downloading speed of the pictures is further improved.
In an exemplary embodiment, similar to the previous embodiment, the event token corresponding to an event picture contains a set of identification information including at least one of: a server address corresponding to a picture server to which an event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the event picture belongs; the group of identification information in the event tokens corresponding to each event picture to be combined is a group of target identification information, and the file identification of the target index file is spliced by the group of target identification information.
Correspondingly, before searching the picture record corresponding to the second event picture from the target index file according to the second event token, the method further comprises:
s61, determining the file identification of the target index file according to a group of target identification information in the second event token;
s62, downloading the target index file from the first server according to the file identification of the target index file.
In this embodiment, when downloading the second event picture, the target index file may be downloaded from the cloud storage to the alarm picture reading proxy server, and the analysis of the index file is performed in the alarm picture reading proxy server, so as to determine the picture record corresponding to the second event picture.
Considering that the file identification of the index file is spliced by a set of identification information, the file identification of the corresponding index file, that is, the file identification of the target index file, can be determined according to a set of target identification information in the second event token carried in the download request. Here, the file identification of the target index file may be a file name of the target index file. The target index file may be downloaded from the first server according to the determined file identification of the target index file. Here, the target index file may be stored in a server other than the first server, that is, the picture-merging file and the corresponding index file may be stored in the same server or may be stored in different servers.
According to the embodiment, the file identification of the corresponding index file is determined through the identification information in the event token in the downloading request, so that the downloading speed of the index file can be improved, and the efficiency of downloading the picture is improved.
In an exemplary embodiment, before receiving the picture downloading request sent by the target device, the method further includes:
s71, displaying an event message list on a display interface of target equipment, wherein the event message list is a list of event messages corresponding to one or more preset events detected by target detection equipment matched with the target equipment;
S72, responding to a selection operation executed on a target event message in an event message list, and acquiring Uniform Resource Locator (URL) information corresponding to the target event message, wherein the URL information is generated according to a second event token corresponding to the target event message, and the second event token is used for identifying a target secondary preset event corresponding to the target event message and detected by target detection equipment;
s73, sending a picture downloading request to the second server, wherein the picture downloading request comprises URL information.
In order to facilitate the user to learn the detected preset event, a corresponding event message may be generated for each detected preset event, and the event message may be sent to the bound terminal device, where the user may trigger downloading of the corresponding event picture from the cloud storage by looking at the event message displayed on the terminal device and by performing a triggering operation on the displayed event message. The event message can be actively pushed by the cloud and can be pulled from the cloud based on a request-response mode.
For the target device, a list of event messages may be displayed on a display interface of the target device. Here, the event message list may be a list of event messages corresponding to one or more preset events detected by the target detection device matched with the target device. Through the selection of the event messages in the event message list, the target device can be triggered to send a picture downloading request and receive the event pictures fed back in the cloud storage.
In response to a selection operation performed on a target event message in the event message list, the target device may acquire URL information corresponding to the target event message. Here, the URL information may be generated according to a second event token corresponding to the target event message. The second event token may be used to identify a target secondary preset event detected by the target detection device corresponding to the target event message.
For example, a token is 1.1.1.1_01_1664266653_yyy, and url reference of the corresponding picture is https: /(ABC/1.1.1.1_01_1664266653_yyy.jpg). Wherein ABC identifies the device serial number; 1.1.1.1_01_1664266653_yyy identifying corresponding url information.
Alternatively, URL information corresponding to the target event message may be stored in the aforementioned database, and may be stored simultaneously with the alarm message record and the alarm picture record corresponding to the alarm message. After acquiring the URL information, the target device may send a picture download request to the second server. Here, the second server may be the alarm picture reading proxy server, and may be a server which is different from the first server and is independent from the first server. URL information may be included in the picture download request.
By the embodiment, the picture downloading request carrying the URL information is generated after the URL information of the picture is acquired, so that the convenience of information acquisition can be improved, and the accuracy and efficiency of event picture downloading are improved.
The following explains a processing method of picture resources in the embodiment of the present application in conjunction with an alternative example. In this optional example, the event picture is an alarm picture, and the preset event is an alarm event.
In the related art, for uploading of alarm pictures, interfaces of cloud storage are required to be called, under the condition that the number of detection devices is large, the number of alarm pictures is increased correspondingly, the calling of the uploading interfaces is increased, and frequent calling can increase the total cost of calling and also can cause certain influence on the performance of cloud storage.
In this regard, the present optional example provides an alarm picture merging and downloading scheme, by merging and uploading alarm pictures, based on the index file and URL rule, the number of times of calling the uploading interface is reduced, and meanwhile, the quick addressing of the merged pictures can be realized.
As shown in fig. 8, the flow of the processing method of the picture resource in this alternative example may include the following steps, where the alarm picture service may include an alarm picture server and an alarm picture reading proxy server:
And step 1, reporting an alarm message to an alarm message server by the equipment.
And 2, the alarm message server distributes an alarm picture server address, generates a token according to a rule, and returns the alarm picture service address to the equipment.
And 3, the alarm picture server can receive an alarm picture carrying a token reported by the equipment.
And 4, the alarm picture server can combine the pictures in the memory and upload the pictures to cloud storage.
And 5, uploading the index file updated according to the token to cloud storage.
And 6, when downloading demands exist, sending a request for downloading the picture to the alarm picture reading proxy server through the APP.
And 7, downloading the index file from the cloud storage by the alarm picture reading proxy server.
And 8, downloading the picture data from the cloud storage by the alarm picture reading proxy server.
And 9, returning the downloaded picture data to the APP.
Through the optional example, based on the mode of combining the index file and the picture, the picture data can be efficiently and accurately positioned, and the problem of high call frequency of the cloud storage uploading API is solved. Meanwhile, through a lightweight URL generation rule algorithm, the problem of quick addressing in picture merging can be solved without depending on an index storage system, and the speed of picture downloading is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM (Read-Only Memory)/RAM (Random Access Memory), magnetic disk, optical disk), including instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for implementing the above-mentioned processing method of picture resources. Fig. 9 is a block diagram of an alternative processing apparatus for picture resources according to an embodiment of the present application, as shown in fig. 9, the apparatus may include:
the first obtaining unit 902 is configured to obtain a set of to-be-combined event pictures reported by a set of detection devices, where each detection device in the set of detection devices corresponds to at least one to-be-combined event picture in the set of to-be-combined event pictures, and each to-be-combined event picture in the set of to-be-combined event pictures is an event picture corresponding to a preset event detected by a detection device corresponding to each to-be-combined event picture;
the execution unit 904 is connected to the first obtaining unit 902, and is configured to execute a picture merging operation on a group of event pictures to be merged to obtain a picture merging file;
the first uploading unit 906 is connected to the executing unit 904, and is configured to upload the combined file to the first server by calling a first uploading interface of the first server.
It should be noted that, the first acquiring unit 902 in this embodiment may be configured to perform the step S202, the executing unit 904 in this embodiment may be configured to perform the step S204, and the first uploading unit 906 in this embodiment may be configured to perform the step S206.
Acquiring a group of event pictures to be combined, which are reported by a group of detection devices, through the module, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined; performing picture merging operation on a group of event pictures to be merged to obtain a picture merging file; the method for processing the picture resources in the related technology solves the problem that cloud storage performance is reduced due to high calling frequency of the picture uploading interface, and improves the cloud storage performance by calling the first uploading interface of the first server to upload the picture merging file to the first server.
In one exemplary embodiment, the first acquisition unit includes:
the receiving module is used for receiving a plurality of event pictures which are reported by a plurality of detection devices and carry corresponding event tokens in preset time, wherein each detection device in the plurality of detection devices corresponds to at least one event picture in the plurality of event pictures, each event picture in the plurality of event pictures is reported by the detection device corresponding to each event picture, and the event token corresponding to each event picture is used for identifying a preset event corresponding to each event picture;
The dividing module is used for dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to the event pictures, wherein one group of event pictures to be combined is one group of event pictures in the plurality of groups of event pictures.
In an exemplary embodiment, the event token corresponding to an event picture contains a set of identification information, the set of identification information including at least one of: a server address corresponding to a picture server to which an event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the event picture belongs; the dividing module comprises:
and the dividing sub-module is used for dividing a group of event pictures with the same identification information contained in the corresponding event token into a group of event pictures to obtain a plurality of groups of event pictures.
In an exemplary embodiment, the set of identification information in the event token corresponding to each to-be-merged event picture is a set of target identification information, and the apparatus further includes:
the second acquisition unit is used for acquiring a first event picture carrying a first event token and reported by the target detection equipment after uploading the picture merging file to the first server by calling a preset uploading interface of the first server, wherein the first event picture is an event picture corresponding to a preset event detected by the target detection equipment;
And the second uploading unit is used for uploading the first event picture to the first server by calling a second uploading interface of the first server under the condition that the group of identification information contained in the first event token is the group of target identification information so as to write the first event picture into the picture merging file.
In an exemplary embodiment, the above apparatus further includes:
the updating unit is used for updating the picture record corresponding to each event picture to be merged in the target index file according to the event token corresponding to each event picture to be merged after the picture merging operation is carried out on a group of event pictures to be merged to obtain the picture merging file, wherein the event token corresponding to each event picture to be merged is reported together with each event picture to be merged, and the picture record corresponding to each event picture to be merged is used for recording the corresponding relation among the event token corresponding to each event picture to be merged, the file path of the picture merging file in the first server and the offset information of each event picture to be merged in the picture merging file.
In an exemplary embodiment, the above apparatus further includes:
The receiving unit is used for receiving a picture downloading request sent by the target device after the picture merging file is uploaded to the first server by calling a preset uploading interface of the first server, wherein the picture downloading request is used for requesting to download a second event picture, the second event picture belongs to a group of event pictures to be merged, and the picture downloading request carries a second event token corresponding to the second event picture;
the searching unit is used for searching a picture record corresponding to the second event picture from the target index file according to the second event token;
the analysis unit is used for analyzing a target file path of the picture merging file in the first server and target offset information of the second event picture in the picture merging file from the target picture record under the condition that the target picture record corresponding to the second event picture is searched;
the third acquisition unit is used for acquiring a second event picture from the first server according to the target file path and the target offset information;
and responding to the picture downloading request, and sending the second event picture to the target equipment.
In an exemplary embodiment, the event token corresponding to an event picture contains a set of identification information, the set of identification information including at least one of: a server address corresponding to a picture server to which an event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the event picture belongs; the group of identification information in the event token corresponding to each event picture to be combined is a group of target identification information; the file identification of the target index file is obtained by splicing a group of target identification information;
The device further comprises:
the determining unit is used for determining the file identification of the target index file according to a group of target identification information in the second event token before searching the picture record corresponding to the second event picture from the target index file according to the second event token;
and the downloading unit is used for downloading the target index file from the first server according to the file identification of the target index file.
In an exemplary embodiment, the above apparatus further includes:
the display unit is used for displaying an event message list on a display interface of the target device before receiving a picture downloading request sent by the target device, wherein the event message list is a list of event messages corresponding to one or more preset events detected by target detection equipment matched with the target device;
a fourth obtaining unit, configured to obtain URL information of a uniform resource locator corresponding to a target event message in the event message list in response to a selection operation performed on the target event message, where the URL information is generated according to a second event token corresponding to the target event message, and the second event token is used to identify a target secondary preset event corresponding to the target event message and detected by the target detection device;
And the sending unit is used for sending a picture downloading request to the second server, wherein the picture downloading request comprises URL information.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to yet another aspect of embodiments of the present application, there is also provided a storage medium. Alternatively, in the present embodiment, the storage medium may be used to execute a program code of the processing method of any of the picture resources described above in the embodiments of the present application.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, acquiring a group of event pictures to be combined, which are reported by a group of detection equipment, wherein each detection equipment in the group of detection equipment corresponds to at least one event picture to be combined in a group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection equipment corresponding to each event picture to be combined;
S2, performing picture merging operation on a group of event pictures to be merged to obtain a picture merging file;
s3, uploading the picture merging file to the first server by calling a first uploading interface of the first server.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device for implementing the above-mentioned processing method of a picture resource, where the electronic device may be a server, a terminal, or a combination thereof.
Fig. 10 is a block diagram of an alternative electronic device, according to an embodiment of the present application, including a processor 1002, a communication interface 1004, a memory 1006, and a communication bus 1008, as shown in fig. 10, wherein the processor 1002, the communication interface 1004, and the memory 1006 communicate with each other via the communication bus 1008, wherein,
a memory 1006 for storing a computer program;
A processor 1006, configured to execute a computer program stored on the memory 1006, and implement the following steps:
s1, acquiring a group of event pictures to be combined, which are reported by a group of detection equipment, wherein each detection equipment in the group of detection equipment corresponds to at least one event picture to be combined in a group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection equipment corresponding to each event picture to be combined;
s2, performing picture merging operation on a group of event pictures to be merged to obtain a picture merging file;
s3, uploading the picture merging file to the first server by calling a first uploading interface of the first server.
Alternatively, in the present embodiment, the communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 10, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other equipment.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 1006 may include, but is not limited to, a first acquiring unit 902, an executing unit 904, and a first uploading unit 906 in the processing device including the picture resource. In addition, other module units in the processing apparatus of the above-mentioned picture resource may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be understood by those skilled in the art that the structure shown in fig. 10 is only schematic, and the device implementing the above-mentioned processing method of the picture resource may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, a mobile internet device (Mobile Intemet Devices, MID), a PAD, etc. Fig. 10 is not limited to the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (11)

1. The processing method of the picture resource is characterized by comprising the following steps:
acquiring a group of event pictures to be combined, which are reported by a group of detection devices, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined;
Performing picture merging operation on the group of event pictures to be merged to obtain a picture merging file;
and uploading the picture merging file to a first server by calling a first uploading interface of the first server.
2. The method of claim 1, wherein the obtaining a set of event pictures to be combined reported by a set of detection devices comprises:
receiving a plurality of event pictures which are reported by a plurality of detection devices and carry corresponding event tokens in preset time, wherein each detection device in the plurality of detection devices corresponds to at least one event picture in the plurality of event pictures, each event picture in the plurality of event pictures is reported by the detection device corresponding to each event picture, and the event token corresponding to each event picture is used for identifying the preset event corresponding to each event picture;
and dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to the event pictures, wherein the group of event pictures to be combined is one group of event pictures in the plurality of groups of event pictures.
3. The method of claim 2, wherein the event token corresponding to an event picture comprises a set of identification information, the set of identification information comprising at least one of: a server address corresponding to a picture server to which the event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which a reporting time of a preset event corresponding to the event picture belongs;
The dividing the plurality of event pictures into a plurality of groups of event pictures according to the event tokens corresponding to the event pictures comprises the following steps:
and dividing the event pictures with the same group of identification information contained in the corresponding event token into a group of event pictures to obtain a plurality of groups of event pictures.
4. A method according to claim 3, wherein the set of identification information in the event token corresponding to each of the event pictures to be merged is a set of target identification information, and after the uploading of the picture merging file to the first server by calling a preset upload interface of the first server, the method further comprises:
acquiring a first event picture carrying a first event token, which is reported by target detection equipment, wherein the first event picture is an event picture corresponding to the preset event detected once by the target detection equipment;
and uploading the first event picture to the first server by calling a second uploading interface of the first server under the condition that the group of identification information contained in the first event token is the group of target identification information, so as to write the first event picture into the picture merging file.
5. The method of claim 1, wherein after performing a picture merging operation on the set of event pictures to be merged to obtain a picture merging file, the method further comprises:
and updating a picture record corresponding to each to-be-combined event picture in a target index file according to the event token corresponding to each to-be-combined event picture, wherein the event token corresponding to each to-be-combined event picture is reported together with each to-be-combined event picture, and the picture record corresponding to each to-be-combined event picture is used for recording the corresponding relation among the event token corresponding to each to-be-combined event picture, the file path of the picture combining file in the first server and the offset information of each to-be-combined event picture in the picture combining file.
6. The method of claim 5, wherein after the uploading the picture-merge file into the first server by invoking a preset upload interface of the first server, the method further comprises: receiving a picture downloading request sent by target equipment, wherein the picture downloading request is used for requesting to download a second event picture, the second event picture belongs to the group of event pictures to be combined, and the picture downloading request carries a second event token corresponding to the second event picture;
According to the second event token, searching a picture record corresponding to the second event picture from the target index file;
under the condition that a target picture record corresponding to the second event picture is found, analyzing a target file path of the picture merging file in the first server and target offset information of the second event picture in the picture merging file from the target picture record;
acquiring the second event picture from the first server according to the target file path and the target offset information;
and responding to the picture downloading request, and sending the second event picture to the target equipment.
7. The method of claim 6, wherein the event token corresponding to an event picture comprises a set of identification information, the set of identification information comprising at least one of: a server address corresponding to a picture server to which the event picture is reported, an equipment group identifier corresponding to a detection equipment for reporting the event picture, and a time slice identifier of a time slice to which the reporting time of the preset event corresponding to the event picture belongs; the group of identification information in the event tokens corresponding to each event picture to be combined is a group of target identification information; the file identification of the target index file is spliced by the group of target identification information;
Before the searching for the picture record corresponding to the second event picture from the target index file according to the second event token, the method further includes:
determining a file identification of the target index file according to the group of target identification information in the second event token;
and downloading the target index file from the first server according to the file identification of the target index file.
8. The method of claim 6, wherein prior to receiving the request for picture download sent by the target device, the method further comprises:
displaying an event message list on a display interface of the target device, wherein the event message list is a list of event messages corresponding to one or more preset events detected by target detection devices matched with the target device;
responding to a selection operation executed on a target event message in the event message list, and acquiring Uniform Resource Locator (URL) information corresponding to the target event message, wherein the URL information is generated according to a second event token corresponding to the target event message, and the second event token is used for identifying a target secondary preset event corresponding to the target event message and detected by the target detection equipment;
And sending the picture downloading request to a second server, wherein the picture downloading request comprises the URL information.
9. A processing apparatus for picture resources, comprising:
the first acquisition unit is used for acquiring a group of event pictures to be combined, which are reported by a group of detection devices, wherein each detection device in the group of detection devices corresponds to at least one event picture to be combined in the group of event pictures to be combined, and each event picture to be combined in the group of event pictures to be combined is an event picture corresponding to a preset event detected by the detection device corresponding to each event picture to be combined;
the execution unit is used for executing the picture merging operation on the group of event pictures to be merged to obtain a picture merging file;
and the first uploading unit is used for uploading the picture merging file to the first server by calling a first uploading interface of the first server.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to perform the method of any of claims 1 to 8 by means of the computer program.
CN202310109712.6A 2023-01-19 2023-01-19 Picture resource processing method and device, storage medium and electronic device Pending CN116132543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310109712.6A CN116132543A (en) 2023-01-19 2023-01-19 Picture resource processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310109712.6A CN116132543A (en) 2023-01-19 2023-01-19 Picture resource processing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116132543A true CN116132543A (en) 2023-05-16

Family

ID=86297158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310109712.6A Pending CN116132543A (en) 2023-01-19 2023-01-19 Picture resource processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116132543A (en)

Similar Documents

Publication Publication Date Title
US9961129B2 (en) Business transaction correlation with client request monitoring data
CN111831548B (en) Dependency relationship topological graph drawing method and device
US20140105577A1 (en) Method, Device and System for Implementing Video Recording Retrieval
KR102504075B1 (en) Matching and attributes of user device events
CN107690081B (en) Video playing method and device, storage medium and electronic device
CN110673833B (en) Information management system for programmed advertisement putting and advertisement putting platform system
CN113687974B (en) Client log processing method and device and computer equipment
CN108322350B (en) Service monitoring method and device and electronic equipment
US20200366967A1 (en) Method and system for monitoring quality of streaming media
CN111614954A (en) Index acquisition processing method and device for streaming media, computer and storage medium
CN114629929B (en) Log recording method, device and system
CN110708571A (en) Video clip playing control method and related product
CN112584200A (en) Screen projection method and system, electronic equipment and storage medium
CN109525622B (en) Fragment resource ID generation method, resource sharing method, device and electronic equipment
CN108415908B (en) Multimedia data processing method and server
CN111405237A (en) Cloud storage system providing preview function and preview method
US10432490B2 (en) Monitoring single content page application transitions
US9374437B2 (en) Schema validation proxy
CN110413684B (en) Database synchronization method, device and system
CN111193942B (en) Streaming media playback method and device
CN116132543A (en) Picture resource processing method and device, storage medium and electronic device
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
CN115134618B (en) Live stream life cycle information processing method and device and computing equipment
CN113778837B (en) Page fault determination method and device, electronic equipment and storage medium
US11361328B2 (en) Reduced network footprint customer behavior analytics

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