Background
Due to the importance of commercial promotion, more and more outdoor advertising terminals are appearing in office buildings, elevator halls and public transportation systems to provide a good advertising promotion effect.
The operation mode of putting advertisement media to each outdoor advertisement terminal at present is mainly that liquid crystal advertisement machines with unified specifications are purchased in batches, point locations with dense pedestrian volume are selected, and after the set liquid crystal advertisement machines reach a certain point location scale, merchant advertisement putting is carried out at each point location.
In the prior art, all outdoor advertising terminals are operated independently, and cannot be used as a comprehensive management system for uniformly checking and issuing contents and spreading specific contents.
In view of the technical problems in the related art, no effective solution is provided at present.
Disclosure of Invention
In order to solve the above technical problem or at least partially solve the above technical problem, the present application provides a processing method and system for controlling multimedia playing.
In a first aspect, an embodiment of the present application provides a processing method for controlling multimedia playing, including:
receiving information to be verified sent by a playing end by using a receiving module;
when the type of the information to be verified is the multimedia data to be verified, a first obtaining module is used for obtaining first characteristic information corresponding to the multimedia data to be verified;
a second acquisition module is used for acquiring a verification result obtained by verifying the multimedia data to be verified;
when the verification result meets the preset requirement, writing the first characteristic information into a preset block chain for storage;
by using a checking module, when the type of the information to be verified is a hash value to be verified, checking the hash value to be verified through information pre-recorded in the block chain to obtain playing validity information corresponding to the playing end; the hash value to be verified corresponds to the first multimedia data currently played by the playing end.
Optionally, as the foregoing processing method, the method further includes:
acquiring multimedia data to be played, timestamp information and a target playing object address by using a third acquisition module;
sending the multimedia data to be played and the timestamp information to a target playing end corresponding to the target playing object address by using a sending module; and enabling the target playing end to play the multimedia data to be played at the target time corresponding to the timestamp information.
Optionally, the processing method as described above, characterized in that,
the obtaining, by using the second obtaining module, a verification result obtained by verifying the multimedia data to be verified includes:
writing the first characteristic information into a message queue by using a first writing unit;
transmitting the multimedia data to be verified to a verification unit by using a receiving and transmitting unit;
verifying the multimedia data to be verified by using a verification unit to obtain a verification result, and transmitting the verification result to the transceiving unit;
the application storage module writes the first feature information into a preset block chain for storage when the verification result meets a preset requirement, and the application storage module comprises:
obtaining the hash value of the multimedia data to be verified from the message queue by using an obtaining unit; the first feature information includes the hash value;
and writing the hash value into a newly generated block in the block chain by using a second writing unit when the verification result meets the preset requirement.
Optionally, as in the foregoing processing method, the obtaining, by using the receiving module, the multimedia data to be verified includes:
filtering the received information to be verified by using a filtering unit;
writing the filtered information to be verified into a message queue by using a third writing unit to obtain first filtered information;
consuming the first filtered information in the message queue by using a consuming unit, and temporarily storing second filtered information obtained by consumption into Redis;
writing the data in the Redis into the HDFS by using a fourth writing unit when the data volume in the Redis reaches a preset first data volume upper limit and/or the storage time reaches a preset first time length upper limit;
and fusing the second filtered information by using a fusion unit to obtain fusion information corresponding to each playing end.
Optionally, as in the foregoing processing method, the filtering the received information by using the filtering unit includes:
acquiring the information sent by the playing end by using an acquisition subunit;
caching the information into a first buffer queue adopting a Set data structure by using a first cache subunit;
when the quantity of the information in the first buffer queue reaches a preset second data quantity upper limit and/or the storage time reaches a preset second duration upper limit, a second buffer subunit is used for buffering the information through a second buffer queue adopting a Set data structure;
and processing the information in the first buffer queue according to a preset processing strategy by using a processing subunit.
Optionally, as in the foregoing processing method, the verifying the hash value to be verified through information pre-recorded in the block chain to obtain the playing validity information corresponding to the playing end includes:
querying in the block chain by using a query unit to obtain a target hash value corresponding to the playing end; the target hash value is the hash value of the second multimedia data corresponding to the playing end; the second multimedia data is multimedia data preset by the playing end for playing;
comparing the hash value to be verified with a target hash value by using a comparison unit to obtain a consistency relation between the first multimedia data and the second multimedia data;
and determining the playing legality information corresponding to the playing end according to the consistency relationship by using a determining unit.
Optionally, as the foregoing processing method, the method further includes:
an instruction generating module is used for generating a shutdown instruction corresponding to the playing end when the playing validity information represents that the second multimedia data is illegal;
and sending the shutdown instruction to the playing end by using an instruction sending module so that the playing end carries out forced shutdown according to the shutdown instruction.
In a second aspect, an embodiment of the present application provides a server for controlling multimedia playing, including:
the receiving module is used for receiving the multimedia data to be verified of the playing terminal;
the first obtaining module is used for obtaining first characteristic information of the multimedia data to be verified;
the second module is used for acquiring a verification result obtained by verifying the multimedia data to be verified;
and the storage module is used for writing the first characteristic information into a preset block chain for storage when the verification result meets the preset requirement.
In a third aspect, an embodiment of the present application provides a control device for controlling multimedia playing, including:
the receiving module is used for receiving the hash value to be verified corresponding to the first multimedia data played by the playing end;
the query module is used for querying in a block chain to obtain a target hash value corresponding to the playing end; the target hash value is a hash value of second multimedia data; the second multimedia data is multimedia data preset by the playing end for playing;
the comparison module is used for comparing the hash value to be verified with a target hash value to obtain a consistency relation between the first multimedia data and the second multimedia data;
and the determining module is used for determining the playing legality information corresponding to the playing end according to the consistency relation.
In a fourth aspect, an embodiment of the present application provides a system for controlling multimedia playing, including:
the receiving module is used for receiving the information to be verified sent by the playing end;
the first obtaining module is used for obtaining first characteristic information of the multimedia data to be verified when the type of the information to be verified is the multimedia data to be verified;
the second acquisition module is used for acquiring a verification result obtained by verifying the multimedia data to be verified;
the storage module is used for writing the first characteristic information into a preset block chain for storage when the verification result meets a preset requirement;
the verification module is used for verifying the hash value to be verified through the information pre-recorded in the block chain when the type of the information to be verified is the hash value to be verified, so as to obtain the playing legality information corresponding to the playing end; the hash value to be verified corresponds to the first multimedia data currently played by the playing end.
Optionally, the system as described above, further comprising:
the third acquisition module is used for acquiring the multimedia data to be played, the timestamp information and the target playing object address;
the sending module is used for sending the multimedia data to be played and the timestamp information to a target playing end corresponding to the target playing object address; and enabling the target playing end to play the multimedia data to be played at the target time corresponding to the timestamp information.
Alternatively, the system, as previously described,
the second acquisition module includes:
a first writing unit, configured to write the first feature information into a message queue;
the receiving and sending unit is used for acquiring the verification result of the multimedia data to be verified;
the verification unit is used for verifying the multimedia data to be verified to obtain the verification result and transmitting the verification result to the transceiving unit;
the memory module includes:
the obtaining unit is used for obtaining the hash value of the multimedia data to be verified from the message queue; the first feature information includes the hash value;
and the second writing unit is used for writing the hash value into a newly generated block in the block chain when the verification result meets the preset requirement.
Optionally, as in the foregoing system, the receiving module includes:
the filtering unit is used for filtering the received information to be verified;
the third writing unit is used for writing the filtered information to be verified into a message queue to obtain first filtered information;
the consumption unit is used for consuming the first filtered information in the message queue and temporarily storing second filtered information obtained by consumption into Redis;
a fourth writing module, configured to write the data in the Redis into the HDFS when the data amount in the Redis reaches a preset first data amount upper limit and/or the storage time reaches a preset first time length upper limit;
and the fusion module is used for fusing the second filtered information to obtain fusion information corresponding to each playing end.
Optionally, as in the foregoing system, the filtering unit includes:
the acquisition subunit is used for acquiring the information sent by the playing end;
the first buffer subunit is used for buffering the information into a first buffer queue adopting a Set data structure;
the second buffer subunit is configured to buffer the information through a second buffer queue adopting a Set data structure when the amount of the information in the first buffer queue reaches a preset second data amount upper limit and/or the storage time reaches a preset second duration upper limit;
and the processing subunit is used for processing the information in the first buffer queue according to a preset processing strategy.
Optionally, as in the foregoing system, the verification module includes:
the query unit is used for querying the block chain to obtain a target hash value corresponding to the playing end; the target hash value is the hash value of the second multimedia data corresponding to the playing end; the second multimedia data is multimedia data preset by the playing end for playing;
the comparison unit is used for comparing the hash value to be verified with a target hash value to obtain a consistency relation between the first multimedia data and the second multimedia data;
and the legality determining unit is used for determining the playing legality information corresponding to the playing end according to the consistency relation.
Optionally, as in the foregoing processing system, the processing system further includes:
a shutdown instruction generating module, configured to generate a shutdown instruction corresponding to the playing end when the playing validity information indicates that the second multimedia data is illegal;
and the second sending module is used for sending the shutdown instruction to the playing end so that the playing end carries out forced shutdown according to the shutdown instruction.
In a sixth aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the processing method according to any one of the preceding claims when executing the computer program.
In a seventh aspect, an embodiment of the present application provides a storage medium, where the storage medium includes a stored program, where the program is executed to perform the method steps of any one of the preceding items. The computer instructions cause the computer to perform a processing method as in any one of the preceding.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the processing method and the system for controlling the multimedia playing can record the multimedia data which passes the verification through the block chain, can effectively avoid the data from being falsified, and can effectively avoid the situation that the multimedia data which is actually played by the playing end is inconsistent with the multimedia data which is actually played by the playing end during the verification, thereby having the characteristics of anti-counterfeiting, non-repudiation and traceability.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 7, according to an embodiment of an aspect of the present application, there is provided asystem 3 for controlling multimedia playing, including:
the receivingmodule 31 is configured to receive information to be verified sent by the playing end;
the first obtainingmodule 32 is configured to obtain first feature information of the multimedia data to be verified when the type of the information to be verified is the multimedia data to be verified;
the second obtainingmodule 33 is configured to obtain a verification result obtained by verifying the multimedia data to be verified;
thestorage module 34 is configured to, when the verification result meets the preset requirement, write the first feature information into a preset block chain for storage;
the verifyingmodule 35 is configured to verify the hash value to be verified through the information pre-recorded in the block chain when the type of the information to be verified is the hash value to be verified, so as to obtain playing validity information corresponding to the playing end; the hash value to be verified corresponds to the first multimedia data currently played by the playing end.
Specifically, as shown in the architecture diagram of fig. 8, thesystem 3 according to the embodiment of the present invention includes a server 1 and acontrol device 2 that are communicatively connected to each other, and the server 1 and thecontrol device 2 are further communicatively connected to a broadcast end 4.
In some embodiments, a system as in the preceding, further comprising:
the third acquisition module is used for acquiring the multimedia data to be played, the timestamp information and the target playing object address;
the sending module is used for sending the multimedia data to be played and the timestamp information to a target playing end corresponding to the target playing object address; and enabling the target playing end to play the multimedia data to be played at the target time corresponding to the timestamp information.
In some embodiments, a system, such as the aforementioned system,
the second acquisition module includes:
the first writing unit is used for writing the first characteristic information into the message queue;
the receiving and sending unit is used for acquiring a verification result of the multimedia data to be verified;
the verification unit is used for verifying the multimedia data to be verified to obtain a verification result and transmitting the verification result to the transceiving unit;
the memory module includes:
the acquiring unit is used for acquiring the hash value of the multimedia data to be verified from the message queue; the first feature information includes a hash value;
and the second writing unit is used for writing the hash value into a newly generated block in the block chain when the verification result meets the preset requirement.
In some embodiments, as in the system above, the receiving module comprises:
the filtering unit is used for filtering the received information to be verified;
the third writing unit is used for writing the filtered information to be verified into the message queue to obtain the first filtered information;
the consumption unit is used for consuming the first filtered information in the message queue and temporarily storing the second filtered information obtained by consumption into the Redis;
the fourth writing module is used for writing the data in the Redis into the HDFS when the data volume in the Redis reaches a preset first data volume upper limit and/or the storage time reaches a preset first time length upper limit;
and the fusion module is used for fusing the second filtered information to obtain fusion information corresponding to each playing end.
In some embodiments, a system as described above, a filtration unit, comprising:
the acquisition subunit is used for acquiring the information sent by the playing end;
the first buffer subunit is used for buffering the information into a first buffer queue adopting a Set data structure;
the second buffer subunit is configured to buffer the information through a second buffer queue adopting a Set data structure when the amount of the information in the first buffer queue reaches a preset second data amount upper limit and/or the storage time reaches a preset second duration upper limit;
and the processing subunit is used for processing the information in the first buffer queue according to a preset processing strategy.
In some embodiments, as in the system above, the verification module comprises:
the query unit is used for querying in the block chain to obtain a target hash value corresponding to the playing end; the target hash value is the hash value of the second multimedia data corresponding to the playing end; the second multimedia data is multimedia data which is preset by the playing end to be played;
the comparison unit is used for comparing the hash value to be verified with the target hash value to obtain a consistency relation between the first multimedia data and the second multimedia data;
and the legality determining unit is used for determining the playing legality information corresponding to the playing end according to the consistency relation.
In some embodiments, a processing system as in the preceding, further comprising:
the shutdown instruction generating module is used for generating a shutdown instruction corresponding to the playing end when the playing validity information represents that the second multimedia data is illegal;
and the second sending module is used for sending the shutdown instruction to the playing end so that the playing end carries out forced shutdown according to the shutdown instruction.
Fig. 1 is a processing method for implementing control of multimedia playing by using the processing system in the foregoing embodiment of the present application, and includes the following steps S1 to S5:
s1, receiving information to be verified sent by a playing end by using a receiving module.
Specifically, the playing end may include a media terminal; the media terminals may be playing devices distributed at various positions and playing audio and video to perform advertising. The information to be verified is the information needing verification; the verification purpose can be to judge whether the audio and video played by the playing end is legal or not, and can also be to judge the validity of the audio and video to be played uploaded by the playing end in advance. The multimedia data to be verified is data which needs to be played by a playing end but is not subjected to compliance verification; that is, the multimedia data to be verified is allowed to be played at the playing end only after being verified according to the method in the embodiment.
S2, when the type of the information to be verified is the multimedia data to be verified, a first obtaining module is used for obtaining first characteristic information of the multimedia data to be verified.
Specifically, the first characteristic information may be obtained by performing hash value calculation on a full file of the multimedia data to be verified; when the multimedia data to be verified is video data or image data, the first feature information may also be obtained by performing hash value calculation on one or more intercepted pictures of the multimedia data to be verified according to a preset image frame interception strategy (for example, acquiring one frame every 10 frames, or acquiring one frame every second, etc.); when the multimedia data to be verified is audio data, the first feature information may also be obtained by performing hash value calculation on one or more audio segments of the audio data obtained by intercepting the audio data according to a preset time interval (for example, obtaining an audio segment with a duration of one second every 15 seconds, and the like).
And S3, acquiring a verification result obtained by verifying the multimedia data to be verified by using a second acquisition module.
Specifically, the multimedia data to be verified can be verified by an intelligent identification method, for example: when the multimedia data to be verified is a video or an image, the image recognition of the multimedia data to be verified can be carried out through a pre-trained image recognition model so as to judge whether illegal contents (such as yellow, gambling, virus and the like) exist in the multimedia data, furthermore, in order to recognize different illegal contents, a plurality of image recognition models which are respectively used for recognizing different objects can be arranged, and the verification result is judged not to pass as long as one of the images recognizes the illegal contents; when the multimedia data is audio information, a corresponding verification result can be obtained by identifying whether illegal keywords appear in the audio information or not.
The verification result can be 'legal' and 'illegal', or 'pass' and 'fail' and so on, which characterize whether the multimedia data can be played at the playing end.
And S4, writing the first characteristic information into a preset block chain for storage when the verification result meets the preset requirement.
Specifically, in a general case, the preset requirement may be: and the verification result indicates that the multimedia data to be verified passes the verification.
After the first characteristic information passes verification, the first characteristic information is characterized to be capable of being played at a playing end, so that the first characteristic information is written into the block chain for storage.
Further, when the verification result meets the preset requirement, a playing time stamp corresponding to the multimedia data to be verified can be generated, and the playing time stamp is sent to the playing end, so that the playing end plays the multimedia data to be verified according to the playing time stamp. Further, when an advertisement is played, for example, the advertisement can be played according to the schedule.
S5, verifying the hash value to be verified through the information pre-recorded in the block chain by using a verification module when the type of the information to be verified is the hash value to be verified to obtain playing legality information corresponding to the playing end; the hash value to be verified corresponds to the first multimedia data currently played by the playing end.
Specifically, in the module for implementing the method, the receiving module and the first obtaining module may be implemented on a server (for example, a broadcast control platform); the checking module and the second obtaining module can be carried out on an auditing end (such as a control device); the playing end, the playing control platform and the control device can be in communication connection with each other and can be in the same block chain system.
The playing end can also comprise a media server or an SDK (Software Development Kit) for information collection and information uploading; when the media server is arranged, the broadcast control platform for realizing the method of the embodiment can communicate with the media server so as to further realize the purpose of acquiring the multimedia data to be verified; when the SDK is set, the media terminal sends the playing record to the SDK by calling the SDK, then the playing record is uploaded to a playing control platform for receiving information by an SDK background, and then the hash value to be verified is sent to an auditing end for realizing the method of the step by the playing control platform.
Uploading the hash value to be verified to a play control platform at a play end; the call request of the auditing end can be accepted; generally, the invoking request is used to obtain the playing record information of the playing end, where the playing record information includes information to be verified; the invocation request may include: the player end (for example, ID or address) that needs to call information, the corresponding time recorded, etc.
After receiving the calling request, the broadcast control platform can call the corresponding data and then upload the data to the auditing end; generally, the information to be verified is a hash value of multimedia data played by the playing end, and since hash values of different files are unlikely to be consistent, a comparison result can be obtained by comparing the information to be verified with a hash value I of the multimedia data played by the playing end, which is preset, that is: the information pre-recorded in the block chain comprises a hash value I; then, determining the playing validity information of the playing end according to the comparison result, specifically: when the information to be verified is consistent with the hash value I, the representation playing end plays legally, and when the information to be verified is inconsistent with the hash value I, the representation playing end plays illegally.
By the method in the embodiment, the multimedia data passing the verification can be recorded through the block chain, so that the data can be effectively prevented from being tampered, and the situation that the multimedia data actually played by the playing end is inconsistent with the multimedia data during the verification can be effectively avoided, and the method further has the characteristics of anti-counterfeiting, non-repudiation and traceability.
As shown in fig. 2, in some embodiments, the processing method as described above further includes steps S6 and S7 as follows:
and S6, acquiring the multimedia data to be played, the timestamp information and the target playing object address by using a third acquisition module.
Specifically, the auditing end in the foregoing embodiment may obtain the multimedia data to be played, the timestamp information, and the target playing object address, that is, the auditing end may have a right to manage and control and issue the playing content.
The multimedia data to be played can be multimedia data needing to be played; the timestamp information may be information for controlling the time for playing the multimedia data to be played by the playing terminal; the target playing object address can be used for sending the multimedia data to be played to the appointed playing end for playing.
S7, sending the multimedia data to be played and the timestamp information to a target playing end corresponding to the target playing object address by using a sending module; and enabling the target playing end to play the multimedia data to be played at the target time corresponding to the timestamp information.
Specifically, the target playing end is a playing end corresponding to the target playing object address; in general, the target playing end and the target playing object address are in one-to-one correspondence, so that the multimedia data to be played and the timestamp information can be sent to the target playing object address, and the purpose that the target playing end plays the multimedia data to be played at the target time corresponding to the timestamp information is achieved.
Optionally, the third obtaining module and the sending module for implementing the method in this embodiment may be implemented on the foregoing control device.
Furthermore, by the method in the embodiment, a specific playing end can be directly designated to play specific multimedia data at a specific time, and the use scenes can be effectively widened.
In some embodiments, the processing method, as previously described,
step S3 is executed by the second obtaining module to obtain a verification result obtained by verifying the multimedia data to be verified, including the following steps S31 and S32:
s31, writing the first characteristic information into a message queue by using a first writing unit;
and S32, verifying the multimedia data to be verified by using the transceiving unit.
That is, after the first characteristic information is obtained, the first characteristic information is written into the message queue; by writing the first feature information into the message queue, optionally, the playing control platform may execute step S31, so that the multimedia data to be verified may be acquired and the first feature information may be verified to be decoupled.
Optionally, the multimedia data to be verified can be sent to the auditing end, and a verification result of the multimedia data to be verified by the auditing end is obtained; that is, the multimedia data to be verified can be verified by the verifying end after being verified. The auditing end can be manual auditing or automatic auditing based on image recognition or audio recognition to obtain a verification result.
Step S4, when the verification result meets the preset requirement, writing the first feature information into a preset block chain for storage, including the following steps S41 and S42:
s41, acquiring a hash value of the multimedia data to be verified from the message queue by using an acquisition unit; the first characteristic information includes a hash value.
Specifically, the information in the message queue is consumed to obtain the hash value of the multimedia data to be verified. Wherein the hash value can be obtained by calculating the MD5 value, etc.
And S42, writing the hash value into a newly generated block in the block chain by using a second writing unit when the verification result meets the preset requirement.
Specifically, in general, when the verification result represents that the verification passes, the multimedia data to be verified is stated to be legal, and the requirement of playing at the playing end is met. The hash value is written to the newly generated block in the block chain. After the consensus is completed in the later period, the hash value can be synchronously stored in each block chain, and by adopting the method in the embodiment, the advantages that the recorded information is irreversible and cannot be tampered can be realized, so that the situation that the illegal multimedia data played by the playing end cannot be identified due to the fact that the recorded information is tampered can be effectively prevented.
One of the optional implementations may be:
1. in order to decouple the architecture, the system performs front-end and back-end separation (wherein, the front-end media server is used for acquiring multimedia data to be verified, the back-end media server is used for verifying the first characteristic information), and because of the front-end and back-end separation, the front-end management server needs to perform hash conversion on the played current material and then send the encrypted MD5 (namely, one type of hash value) to the message queue;
2. the back-end management server queues the consumption message and interacts MD5 with the blockchain. If the auditing end receives the data that the auditing is successful, then MD5 is stored in the new block. If the log to be verified is received from the upstream (for example, whether the content played by a certain playing end is legal or not is verified), no new block is generated.
3. The front-end media server passes the log to be verified and MD5 to a message queue for consumption by the back-end media server when reviewing the query.
4. The back-end management server consumes the message queue and queries the corresponding block chain to acquire the transaction details and judge whether the transaction details are legal or not when checking and querying.
As shown in fig. 3, in some embodiments, as the aforementioned processing method, the step S1 of obtaining the to-be-verified information sent by the playing end includes the following steps S11 to S15:
s11, filtering the received information to be verified by using a filtering unit;
optionally, the information sent by the playing end may be filtered by the front-end media server. Wherein, the filtering may be to remove duplicate information or delete wrong information, etc.
Meanwhile, the received information may be sent by a plurality of different broadcasting terminals.
And S12, writing the filtered information to be verified into a message queue by using a third writing unit to obtain first filtered information.
That is, after filtering, the respective information may be written in the message queue in sequence; furthermore, when writing, the information can be divided into a plurality of different sessions and written into different message queues because the information comprises a plurality of different types of data such as multimedia data to be verified and information to be verified; wherein the first filtered information is information written into the message queue.
And S13, consuming the first filtered information in the message queue by using a consumption unit, and temporarily storing the second filtered information obtained by consumption into the Redis.
Specifically, the first filtered information is the filtered information written into the message queue; the second filtered message is the message read from the message queue. When a plurality of message queues exist, the server consumes according to the priority preset by each message queue, so that the messages with high priority can be guaranteed to be processed and recorded firstly, and in addition, when the queues are full or the performance of a processor is poor, the messages with high priority can be guaranteed not to be lost. For example: the priority of yellow identification in the playing log is very high, and when the condition occurs offline, the server needs to ensure quick response and make judgment to ensure stable playing of the offline screen.
Step S14, writing data in the Redis into an HDFS (Hadoop Distributed File System) by using a fourth writing unit when the data volume in the Redis reaches a preset first data volume upper limit and/or the storage time reaches a preset first time length upper limit;
the first upper limit of the data amount and the first upper limit of the time length can be adjusted according to actual application.
And S15, fusing the second filtered information by using a fusion unit to obtain fusion information corresponding to each playing end.
Specifically, the fusion is mainly to deconstruct the second filtered information and perform fusion according to the size sequence of the information types, so as to integrate the same kind of information and the context-related information together.
In some embodiments, as in the foregoing processing method, the step S11 uses a filtering unit to filter the received information, including the following steps S111 to S114:
s111, acquiring information sent by a playing end by using an acquisition subunit;
s112, caching the information into a first buffer queue adopting a Set data structure by using a first cache subunit;
s113, caching the information through a second buffer queue adopting a Set data structure when the information quantity in the first buffer queue reaches a preset second data quantity upper limit and/or the storage time reaches a preset second duration upper limit by using a second buffer subunit;
and S114, processing the information in the first buffer queue according to a preset processing strategy by using the processing subunit.
Specifically, after information sent by a playing end is obtained, the information is cached into a first buffer queue and a second buffer queue; the buffering method comprises the following steps: when the quantity of the information in the first buffer queue reaches a preset second data quantity upper limit and/or the storage time reaches a preset second duration upper limit, caching the information through a second buffer queue; by adopting two buffer queues, each buffer queue can only perform one operation respectively: one responsible for writing data from and one responsible for reading data. When the information in one buffer queue is completely read, the information is used as a queue for writing data, and data is read from the other buffer queue.
Because the Set data structure has the function of removing the duplicate, the information in the first buffer queue and the second buffer queue can be removed by caching the information in the first buffer queue and the second buffer queue which adopt the Set data structure, so that repeated information can be prevented from being subjected to multiple meaningless operations, and the processing efficiency is improved.
Furthermore, the information can be verified through a preset filtering strategy, and when the information does not accord with the filtering strategy, the playing end is forbidden. For example, the filtering policy may be: when the ID of the playing end does not exist or is not registered, the playing time is not in a reasonable range, when the content is abnormal and too much, when a certain number of messages which do not conform to the content exist; the account for the current media is blocked for a period of time when the above is satisfied.
As shown in fig. 4, in some embodiments, as in the foregoing processing method, the step S5 of verifying the hash value to be verified through the pre-recorded information in the block chain, and obtaining the playing validity information corresponding to the playing end includes the following steps S51 to S53:
s51, querying in a block chain by using a query unit to obtain a target hash value corresponding to the playing end; the target hash value is the hash value of the second multimedia data corresponding to the playing end; the second multimedia data is multimedia data which is preset by the playing end to be played;
s52, comparing the hash value to be verified with the target hash value by using a comparison unit to obtain a consistency relation between the first multimedia data and the second multimedia data;
and S53, determining the playing legality information corresponding to the playing end according to the consistency relationship by using a legality determining unit.
Specifically, the first multimedia data is multimedia data currently played or historically played by a playing end; wherein the hash value to be verified is a hash value corresponding to the first multimedia data, and an alternative implementation method may be to use MD5 value.
After the hash value to be verified is obtained, all target hash values corresponding to the playing end are inquired in the block chain, and the consistency relation between the hash value to be verified and each target hash value can be obtained through one-by-one comparison; when the hash value to be verified is completely consistent with one of the target hash values, the consistency relation is 'consistent'; when the hash value to be verified is inconsistent with any target hash value, the consistency relationship is inconsistent.
Generally, when the consistency relationship is "consistency", it represents that the first multimedia data is pre-checked and passed, and the corresponding playing validity information is "validity"; on the contrary, when the consistency relationship is "inconsistent", it represents that the first multimedia data is not checked in advance, and thus the corresponding playing validity information is "illegal".
In some use scenes, as in the actual requirement of advertisement playing, there are also some operations of first delivery and then examination; that is to say: when the playing end plays the multimedia data to be audited, the auditing operation is carried out on the multimedia data to be audited; therefore, one of the optional implementations may also be:
the playing end can play the multimedia data to be played according to a preset schedule while uploading and verifying the multimedia data to be played.
Meanwhile, the playing end still uploads the hash value to be verified of the current playing content to the auditing end during playing. When the auditing end audits the multimedia data to be played and determines that the multimedia data to be played is illegal, the target hash value of the local multimedia data to be played is illegally marked.
After the auditing end receives the uploaded hash value to be verified and determines that the hash value to be verified is consistent with the illegally marked target hash value, the shutdown operation is directly sent to the playing end, and shutdown operation is directly executed on playing equipment of the playing end.
In some embodiments, the processing method as described above, further comprises steps S8 and S9 as follows:
s8, generating a shutdown instruction corresponding to the playing end by using an instruction generating module when the playing validity information represents that the second multimedia data is illegal;
and S9, sending the shutdown instruction to the playing end by using the instruction sending module so that the playing end performs forced shutdown according to the shutdown instruction.
Specifically, when the broadcast validity information indicates that the second multimedia data is not subjected to backup verification in advance, such as "illegal", the generating of the shutdown instruction corresponding to the broadcast end may include: a shutdown command and a shutdown instruction to be generated.
After the shutdown instruction is generated, the shutdown instruction can be sent to the playing end by determining the address information of the playing end; so that the playing end can be forced to be shut down according to the shutdown instruction.
Optionally, the instruction generating module and the instruction sending module for implementing the method in this embodiment may be implemented on the foregoing broadcast control platform.
By the method in the embodiment, the playing end can be directly controlled to be powered off, and further, the content played by the playing end is effectively managed.
As shown in fig. 5, according to an embodiment of another aspect of the present application, there is also provided a server 1 for controlling multimedia playback, including:
the receivingmodule 11 is configured to receive multimedia data to be verified at a playing end;
the first obtainingmodule 12 is configured to obtain first feature information of the multimedia data to be verified;
the second obtainingmodule 13 is configured to obtain a verification result obtained by verifying the multimedia data to be verified;
and thestorage module 14 is configured to write the first feature information into a preset block chain for storage when the verification result meets a preset requirement.
Specifically, the specific process of implementing the functions of each module in the apparatus according to the embodiment of the present invention may refer to the related description in the method embodiment, and is not described herein again.
As shown in fig. 6, according to an embodiment of another aspect of the present application, there is also provided acontrol device 2 for controlling multimedia playback, including:
the obtainingmodule 21 is configured to receive a hash value to be verified corresponding to first multimedia data played by a playing end;
thequery module 22 is configured to query the block chain to obtain a target hash value corresponding to the playing end; the target hash value is a hash value of the second multimedia data; the second multimedia data is multimedia data which is preset by the playing end to be played;
thecomparison module 23 is configured to compare the hash value to be verified with the target hash value to obtain a consistency relationship between the first multimedia data and the second multimedia data;
and the determiningmodule 24 is configured to determine, according to the consistency relationship, playing validity information corresponding to the playing end.
Specifically, the first multimedia data is multimedia data currently played or historically played by a playing end; wherein the hash value to be verified is a hash value corresponding to the first multimedia data, and an alternative implementation method may be to use MD5 value.
After the hash value to be verified is obtained, all target hash values corresponding to the playing end are inquired in the block chain, and the consistency relation between the hash value to be verified and each target hash value can be obtained through one-by-one comparison; when the hash value to be verified is completely consistent with one of the target hash values, the consistency relation is 'consistent'; when the hash value to be verified is inconsistent with any target hash value, the consistency relationship is inconsistent.
Generally, when the consistency relationship is "consistency", it represents that the first multimedia data is pre-checked and passed, and the corresponding playing validity information is "validity"; on the contrary, when the consistency relationship is "inconsistent", it represents that the first multimedia data is not checked in advance, and thus the corresponding playing validity information is "illegal".
In some use scenes, as in the actual requirement of advertisement playing, there are also some operations of first delivery and then examination; that is to say: when the playing end plays the multimedia data to be audited, the auditing operation is carried out on the multimedia data to be audited; therefore, one of the optional implementations may also be:
the playing end can play the multimedia data to be played according to a preset schedule while uploading and verifying the multimedia data to be played.
Meanwhile, the playing end still uploads the hash value to be verified of the current playing content to the auditing end during playing. When the auditing end audits the multimedia data to be played and determines that the multimedia data to be played is illegal, the target hash value of the local multimedia data to be played is illegally marked.
After the auditing end receives the uploaded hash value to be verified and determines that the hash value to be verified is consistent with the illegally marked target hash value, the shutdown operation is directly sent to the playing end, and shutdown operation is directly executed on playing equipment of the playing end.
Further, the server 1 in the embodiment shown in fig. 5 can access thecontrol device 2 in the embodiment shown in fig. 6 through a SSP (provider platform) delivery platform through a specific API of the server.
And after the control device is accessed, when the advertisement is put, the advertisement format and the content are sent through the API.
The control device side can carry out the operation of examining first and then throwing, search whether the current creative is over examined in the block chain, if the current creative is over examined, the current creative is issued to a media playing control server for controlling media playing, and if the current creative is not over examined, the current creative is returned to SSP.
When the media playing control server receives the advertisement message, the media playing control server can schedule the advertisement according to the timestamp and send the advertisement to the playing end.
According to another embodiment of the present application, there is also provided an electronic apparatus including: as shown in fig. 9, the electronic device may include: the system comprises aprocessor 1501, acommunication interface 1502, amemory 1503 and acommunication bus 1504, wherein theprocessor 1501, thecommunication interface 1502 and thememory 1503 complete communication with each other through thecommunication bus 1504.
Amemory 1503 for storing a computer program;
theprocessor 1501 is configured to implement the steps of the above-described method embodiments when executing the program stored in thememory 1503.
The bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The embodiment of the present application further provides a storage medium, where the storage medium includes a stored program, and the program executes the method steps of the foregoing method embodiment when running.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.