CN112862498A - Product tracing method and device, electronic device and storage medium - Google Patents

Product tracing method and device, electronic device and storage medium Download PDF

Info

Publication number
CN112862498A
CN112862498A CN202011604791.0A CN202011604791A CN112862498A CN 112862498 A CN112862498 A CN 112862498A CN 202011604791 A CN202011604791 A CN 202011604791A CN 112862498 A CN112862498 A CN 112862498A
Authority
CN
China
Prior art keywords
product
images
time information
stage
image
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
CN202011604791.0A
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.)
Zhejiang Jiaguwen Chaojima Technology Co ltd
Original Assignee
Zhejiang Jiaguwen Chaojima 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 Zhejiang Jiaguwen Chaojima Technology Co ltd filed Critical Zhejiang Jiaguwen Chaojima Technology Co ltd
Priority to CN202011604791.0A priority Critical patent/CN112862498A/en
Publication of CN112862498A publication Critical patent/CN112862498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The application relates to a product tracing method, a device, an electronic device and a storage medium, wherein the product tracing method comprises the following steps: acquiring images and time information of image shooting of products from production of raw materials to each stage of product shelving, and storing the images by taking the time information of the image shooting as an index; acquiring a product batch of a product, determining time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image; the target images are arranged according to the time sequence, the video files are generated according to the target images arranged according to the time sequence, and the video files are stored by taking the product batches as indexes.

Description

Product tracing method and device, electronic device and storage medium
Technical Field
The present application relates to the field of tracing, and in particular, to a method and an apparatus for tracing a product, an electronic apparatus, and a storage medium.
Background
With the increasing abundance of living standard of people, various commodities are continuously released to meet the daily requirements of people, and meanwhile, the sources of the commodities are not authenticated and are also the main targets of counterfeit making and selling by lawbreakers. Particularly for products with higher added values, the counterfeit and counterfeit selling channel thereof brings more serious economic loss to consumers, enterprises and distributors. As such, the technology of tracing the source of the product is also continuously updated and developed with the development of the times and the progress of the technology.
At present, a product tracing method is mainly used for storing all images of a product from a seed stage to a finished product stage, when a user conducts product tracing through two-dimensional code scanning, the user needs to search for required information from a plurality of stored images, in addition, the whole production process of the product can be known only through browsing all the images, and the problem of complexity exists.
At present, an effective solution is not provided aiming at the problem of complexity in product tracing in the related technology.
Disclosure of Invention
The embodiment of the application provides a product tracing method, a product tracing device, an electronic device and a storage medium, and aims to at least solve the problem that the product tracing is complicated in the related technology.
In a first aspect, an embodiment of the present application provides a product tracing method, including:
acquiring images of products from production of raw materials to each stage of putting the products on shelves and time information for shooting the images, and storing the images by taking the time information for shooting the images as an index;
acquiring a product batch of the product, determining time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image;
arranging the target images according to a time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
In some of these embodiments, obtaining images of the product from the production of the feedstock to various stages of the product racking comprises:
determining the time interval for shooting images according to the production cycle of the product, and acquiring the images of the product from the production of the raw materials to each stage of the product on the shelf according to the time interval, wherein the production cycle comprises a planting period, a maturing period and a harvesting period.
In some embodiments, acquiring images of a product from production of a raw material to each stage of shelving of the product and time information of capturing the images, and storing the images with the time information of capturing the images as an index includes:
the method comprises the steps of obtaining images of products from production of raw materials to each stage of product racking, shooting time information and image related information, and storing the images and the image related information to a block chain by taking the time information of the images as an index, wherein the image related information comprises product types, product producing areas, product growth environment information and product inspection qualified codes.
In some of these embodiments, generating a video file from the target images arranged in chronological order comprises:
and determining synthesis parameters of the video file according to an application scene of a product to be traced, and generating the video file according to the target image and the synthesis parameters which are arranged according to the time sequence, wherein the synthesis parameters comprise a code rate, a frame rate and a resolution.
In some embodiments, obtaining a product batch of the product, determining time information of each stage of the product according to the product batch, and querying the stored image for a target image corresponding to the time information of each stage of the product includes:
and acquiring a product batch of the product, determining time information, product types and product production places of all stages of the product according to the product batch, and inquiring a target image corresponding to the time information, the product types and the product production places of all stages of the product from the stored image.
In some of these embodiments, storing the video file with the product lot as an index comprises:
and storing the video file to cloud storage by taking the product batch as an index.
In some embodiments, storing the video file with the product lot as an index comprises:
and receiving a product tracing request, and returning a corresponding video file according to the product batch.
In a second aspect, an embodiment of the present application provides a product tracing apparatus, including:
the acquisition module is used for acquiring images of products from production of raw materials to each stage of product shelving and time information of image shooting, and storing the images by taking the time information of image shooting as an index;
the storage module is used for acquiring the product batch of the product, determining the time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image;
and the generation module is used for arranging the target images according to a time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
In a third aspect, an embodiment of the present application provides an electronic apparatus, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the product tracing method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the product tracing method according to the first aspect.
Compared with the related art, the product tracing method, the product tracing device, the electronic device and the storage medium provided by the embodiment of the application store the images by acquiring the images of the products from the production of raw materials to each stage of the product shelving and the time information of shooting the images and taking the time information of shooting the images as an index; acquiring a product batch of the product, determining time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image; the target images are arranged according to the time sequence, the video files are generated according to the target images arranged according to the time sequence, and the video files are stored by taking the product batches as indexes, so that the problem of complexity in product source tracing is solved, and the information of each link from production to marketing of the product is quickly checked.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a terminal of a product tracing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a product tracing method according to an embodiment of the present application;
FIG. 3 is a flow chart of a product tracing method according to the preferred embodiment of the present application;
FIG. 4 is a schematic diagram of an agricultural product tracing node according to a preferred embodiment of the present application;
FIG. 5 is a timing diagram of a product tracing method according to the preferred embodiment of the present application;
fig. 6 is a block diagram of a product tracing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference herein to "a plurality" means greater than or equal to two. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The Internet of Things (IOT) is used for collecting any object or process needing monitoring, connection and interaction in real time through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors, laser scanners and The like, collecting various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, positions and The like, and realizing The ubiquitous connection of objects, objects and people through various possible network accesses, thereby realizing intelligent sensing, identification and management of The objects and The processes. The internet of things is an information bearer based on the internet, a traditional telecommunication network and the like, and all common physical objects which can be independently addressed form an interconnected network.
Before describing and explaining embodiments of the present application, a description will be given of the related art used in the present application as follows:
video code rate: the code rate is larger, which indicates that the sampling rate is larger in unit time, the data stream precision is higher, and the displayed effect is that the video picture is clearer.
Video frame rate: generally speaking, 25 frames of a video means that the video frame rate, that is, 25 frames will be displayed in 1 second, the video frame rate affects the smoothness of the picture, and the higher the video frame rate is, the smoother the picture appears.
Video resolution: the resolution affects the size of the video image and is proportional to the size of the video image, and the higher the video resolution is, the larger the image is, the larger the corresponding video file size is.
Video transcoding: video transcoding technology converts video signals from one format to another, which has two important functions oriented to different domains, firstly, communication is realized between legacy devices and emerging devices, for example, many existing video conference systems are built based on the old video coding standard h.263, and the latest video conference systems adopt the h.264 baseline specification. Therefore, real-time video transcoding technology is an essential factor for realizing communication between the two.
Real Time Messaging Protocol (RTMP): it is proposed by Adobe corporation that at the application layer in the TCP/IP five-layer architecture of the internet, the RTMP protocol is based on the TCP protocol, i.e. RTMP actually uses TCP as the transport protocol. The TCP protocol is positioned in a transmission layer, is a connection-oriented protocol and can provide reliable guarantee for data transmission, so that the data transmission on the network does not have the situation of packet loss.
Real Time Streaming Protocol (RTSP): the protocol is an application layer protocol in a TCP/UDP protocol system, is an IETF RFC standard submitted by Columbia university, Internet scenery and RealNetworks company, and defines how one-to-many applications can effectively transmit multimedia data through an IP network. RTSP is architecturally located above RTP and RTCP, and it uses TCP or RTP to complete data transmission, and most currently on the market use RTP to transmit media data.
HTTP-based Streaming media network transport protocol (HTTP Live Streaming, abbreviated as HLS): is a streaming media network transmission protocol based on Http protocol proposed by apple inc. Is part of the apple QuickTime X and iPhone software systems. It works by dividing the entire stream into small HTTP-based files to download, only a few at a time. While the media stream is playing, the client may choose to download the same resource from many different alternate sources at different rates, allowing the streaming media session to accommodate different data rates. When starting a streaming media session, the client downloads an extended M3U (M3u8) playlist file containing metadata for finding available media streams.
Universal Unique Identifier (UUID for short): is a standard for software construction and is part of the open software foundation organization in the field of distributed computing environments. The aim is to enable all elements in the distributed system to have unique identification information without specifying the identification information through a central control end. In this way, everyone can create a UUID that does not conflict with others. In such a case, the name duplication problem at the time of database creation does not need to be considered.
CONCAT protocol: is a virtual concatenation script decomposer provided by FFMPEG, which is in the form of a regular script file. A video playlist can be defined using CONCAT and FFMPEG will parse one by one according to your defined order as if they were a video source themselves when playing.
FFMPEG: the method is a third-party open source framework for multimedia transcoding and audio/video streaming transmission, and the third-party library is based on C language. The FFMPEG under the iOS platform mainly comprises the following functions: decoding, encoding, transcoding, mixing, extracting, streaming and filtering of video and audio.
Block chains: is a term of information technology field. In essence, the system is a shared database, and the data or information stored in the shared database has the characteristics of 'unforgeability', 'whole-course trace', 'traceability', 'public transparency', 'collective maintenance', and the like. Based on the characteristics, the block chain technology lays a solid 'trust' foundation, creates a reliable 'cooperation' mechanism and has wide application prospect.
MP 4: is a set of compression coding standards for audio and video information, which is established by the international organization for standardization (ISO) and the "video Experts Group" (MPEG) under the International Electrotechnical Commission (IEC).
H.264: or MPEG-4 part ten (AVC for short), is a latest generation of Video compression standard commonly introduced in 2003 by the international telecommunication standardization sector ITU-T and the international organization for standardization ISO/IEC. Currently, the h.264 standard is widely applied to wired/wireless video remote monitoring, network interactive media, digital television and video conference, etc.
The method provided by the embodiment can be executed in a terminal, a computer or a similar operation device. Taking the operation on the terminal as an example, fig. 1 is a hardware structure block diagram of the terminal of the product tracing method according to the embodiment of the present invention. As shown in fig. 1, the terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the terminal. For example, the terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the product tracing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The present embodiment provides a product tracing method, and fig. 2 is a flowchart of the product tracing method according to the embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S201, images and time information of the images of the products in all stages from production of the raw materials to shelving of the products are obtained, and the images are stored by taking the time information of the images as indexes.
The stages of the product from the production of raw materials to the shelving of the product comprise a planting process, a harvesting process, an inspection and detection process and a packaging management process.
Step S202, obtaining the product batch of the product, determining the time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored images.
Step S203, arranging the target images according to the time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
Through the steps S201 to S203, images and time information of the shot images of the product from the production of the raw materials to the various stages of the product shelving are obtained, and the time information of the shot images is used as an index to store the images; acquiring a product batch of a product, determining time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image; the target images are arranged according to the time sequence, the video files are generated according to the target images arranged according to the time sequence, and the video files are stored by taking the product batches as indexes, so that the problem of complexity in product source tracing is solved, and the information of each link from production to marketing of the product is quickly checked.
In some of these embodiments, obtaining images of the product from the production of the feedstock to various stages of product racking comprises:
determining the time interval for shooting images according to the production cycle of the product, and acquiring the images of the product from the production of the raw materials to each stage of putting the product on shelves according to the time interval, wherein the production cycle comprises a planting period, a growth period, a maturation period and a harvesting period.
By the mode, the time interval for shooting the images is determined according to the production cycle of the product, and the images of the product in each stage from the production of the raw materials to the racking of the product are obtained according to the time interval, so that all the images of the product from the production to the final racking do not need to be shot and stored, but the related images are shot and stored in a targeted mode according to the production cycle of the product, redundant images are removed, and the storage space of the images is saved.
In some embodiments, acquiring images and time information of the captured images of the product from the production of the raw material to the various stages of the product shelving, and storing the images with the time information of the captured images as an index includes:
the method comprises the steps of obtaining images of products from production of raw materials to each stage of product racking, time information of image shooting and image related information, and storing the images and the image related information to a block chain by taking the time information of the image shooting as an index, wherein the image related information comprises product types, product production places, product growth environment information and product inspection qualified codes.
By the mode, the images and the image related information of each stage of the product are stored in the block chain, a trust sharing mechanism among the stages is established, the images and the image related information of each stage can be prevented from being tampered, and the reliability of the video file generated by the images of each stage of the image is ensured.
In some of these embodiments, generating a video file from the chronologically ordered target images comprises:
and determining synthesis parameters of the video file according to the application scene of the product to be traced, and generating the video file according to the target images and the synthesis parameters which are arranged according to the time sequence, wherein the synthesis parameters comprise a code rate, a frame rate and a resolution. For example, in a scene with high requirements on video quality and definition, a higher video code rate and a higher video resolution can be set; in a scene with high requirements on the smoothness of video pictures, a higher video frame rate can be set.
By the method, the synthesis parameters of the video files are determined according to the application scenes of the products to be traced, the target images arranged according to the time sequence are synthesized into the video files, and the corresponding video files are generated according to the scenes in a self-adaptive mode.
In some embodiments, obtaining a product batch of a product, determining time information of each stage of the product according to the product batch, and querying a target image corresponding to the time information of each stage of the product from stored images includes:
the method comprises the steps of obtaining a product batch of a product, determining time information, a product type and a product origin of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information, the product type and the product origin of each stage of the product from a stored image.
By the mode, the time information, the product type and the product origin of each stage of the product are determined according to the product batch, so that the corresponding target image can be screened from the stored images according to the time information, the product type and the product origin, the target image is obtained according to the product batch information, and preparation is made for subsequently generating the video file associated with the product batch information according to the target image.
In some embodiments, storing the video file with the product lot as the index includes: and storing the video files to cloud storage by taking the product batches as indexes.
By the method, the video files are stored in the cloud storage by taking the batch information of the products as the index, a reliable, safe and compliant storage mode is provided, the video files can be accessed at any position of the Internet, and the video access requirements of different scenes are met.
In this embodiment, storing the video file with the product batch as the index includes: and receiving a product tracing request, and returning a corresponding video file according to the product batch.
By the method, when the product tracing request is received, the corresponding video files are returned according to the batches of the products, the video files corresponding to the batches of the products are obtained from the client, and a user can trace the sources of the products according to the video files.
In some of these embodiments, generating the video file from the chronological target image further comprises:
acquiring environmental information related to images, and generating a video file from target images arranged according to a time sequence according to the environmental information, wherein the generated video file comprises the environmental information of a product, and the environmental information comprises the weather of the product, the growth temperature of the product, the sunshine time of the product and the annual precipitation of the product.
By means of the mode, the video file is generated according to the target images which are arranged according to the time sequence and the environment information, the information under the environment of the growth of the product can be known according to the video of the generated video file, and the growth process of the product can be known more comprehensively.
The embodiments of the present application are described and illustrated below by means of preferred embodiments.
Fig. 5 is a timing diagram of a product tracing method according to a preferred embodiment of the present application, and fig. 3 is a flowchart of a product information tracing method according to a preferred embodiment of the present application, as shown in fig. 3, the flowchart includes the following steps:
step S301, a camera monitoring cluster is established based on the tracing nodes, and relevant product information is input into each tracing node.
Fig. 4 is a schematic diagram of a traceability node of an agricultural product according to a preferred embodiment of the present application, as shown in fig. 4, the traceability node of the agricultural product includes a subject record, base information, a planting process, a harvesting process, inspection, package management and certificate management, wherein the subject record includes a name of a business producing the agricultural product, a business license, a business address, a business uniform social credit code, a business honor, a business contact and a business contact telephone, and the base information includes a base geographic location, a base climate and a base environment.
The method comprises the steps of establishing a camera monitoring cluster based on traceability nodes, monitoring each traceability node through the camera monitoring cluster, inputting product related information into each traceability node, storing the product related information to a block chain, wherein the product related information comprises product types, product production places, product climates, product batches and product inspection codes.
Through the mode, each tracing node of the product is monitored through the camera, the related information of the product is input into the tracing nodes, and the related information of the product is stored in the block chain, so that on one hand, the monitoring of each tracing node through the camera is realized, and the preparation is made for the follow-up realization of product tracing, on the other hand, a trust consensus mechanism between the tracing nodes is established, and the related information of the product is prevented from being tampered.
Step S302, an image resource library is obtained according to the snap plan.
The method for acquiring the image resource library according to the screenshot plan comprises the following steps:
step 1, setting a snap plan.
The grapple plan comprises a monitoring platform, a monitoring place, an execution mode and a grapple cycle, wherein the execution mode comprises each integral point execution and interval cycle execution.
And 2, capturing the image of each tracing node according to the snapshot plan.
The method comprises two modes, wherein the mode comprises the steps of accessing a specified camera through a monitoring platform, acquiring real-time streaming media addresses of video transmission protocols RTMP, RTSP and HLS, and using an FFMPEG tool to perform real-time streaming media image capture according to the live streaming addresses; and the second mode is to call an API (application programming interface) of the HTTP/HTTPS (hyper text transport protocol/hypertext transfer protocol secure) protocol of the monitoring platform in real time through the IP (Internet protocol), the Appkey and the Secret information of the monitoring platform and capture the image through the API.
Every tracing node has the plan of snapping, the camera in the cluster is monitored through the camera and the image of every tracing node is snapped, for example, the process from strawberry production to marketing is taken as an example, the growth cycle of the strawberry is half a year, the base environment and the crop generation environment can be obtained through monitoring before sowing, the planting process can detect the planting time and the planting mode, the process of picking the strawberry can be recorded in the harvesting process, the growth cycle of the strawberry can be calculated from the planting process to the harvesting process, the inspection process can record the inspection and detection process of the strawberry and the code assigning process after the quality of the strawberry meets the requirements, and the process of packaging the strawberry after the quality of the strawberry is qualified is recorded in the packaging process.
And 3, storing the image of each tracing node into an image resource library.
And (3) acquiring the images obtained in the step (2), storing the obtained images into an image resource library, wherein the image attributes comprise resolution, size, file format, shooting time and monitoring point names, each image is named by a unique identifier UUID and a timestamp identifier, the generation time of the image is accurately matched with the shooting time, and the image resource library records the current environment, the facing direction, the shooting time, the specific time, the unique serial number UUID of the monitoring point, the monitoring point name of each tracing node and acquires the detailed shooting location according to the longitude and latitude of the monitoring point.
Through the steps, the image of each tracing node is snapshotted according to the set snapshot plan, and the image of each tracing node is stored in the image resource library, so that the image of each tracing node is snapshotted, the passing node process is converted into a visual image of the storage database, and preparation is made for subsequently selecting a target image from the image resource library according to the product batch information.
Step S303, generating a CONCAT protocol file according to the image resource library.
Arranging image physical paths according to the image generation time in sequence to generate a CONCA protocol file, recording image resource absolute paths and recording display duration parameters of each image by the CONCAT protocol file, sequentially connecting the image paths according to the time of generating the images, namely recording the position of a start frame in the first line of the CONCAT protocol file, and storing the CONCAT protocol file to a server.
Through the mode, the image physical paths are arranged according to the generation time sequence of the images to generate the CONCAT protocol file, and preparation is made for generating the corresponding video file according to the CONCAT protocol file.
And step S304, generating a video file according to the CONCAT protocol file, the image resource library and the video clip plan.
Generating a video file according to the CONCAT protocol file, the image resource library and the video clip plan mainly comprises the following steps:
step 1, a video clip plan is created.
According to different application scenes and purposes, the number of frames displayed per second, the code rate, the resolution and the coding mode of the video are set in a self-defined mode, for example, when the video is played on a mobile phone, the flow rate required by the video is larger, the code rate needs to be improved in the scene, the code rate is the number of bits of data transmitted in unit time during data transmission, the unit is kilo bits per second (kbps), and the higher the code rate is set, the faster the video can be loaded.
And 2, generating a video file according to the CONCAT protocol file, the image resource library and the video clip plan.
Searching target images corresponding to the product batch information in an image resource library according to the product batch information, determining a target image storage path arranged according to the snapshot time according to the CONCAT protocol file content, acquiring an image stream according to the target image storage path arranged according to the snapshot time, determining a frame rate, a code rate and a resolution according to a video clip plan, performing FFMPEG transcoding on the image stream according to the determined frame rate, code rate and resolution, controlling the size of the file by coding and compressing the code rate again, finally generating an MP4 video file in an H.264 coding format, and forming video files generated by all batch information into the video resource library, for example, the video of the whole production process from the growth of seeds or young stock to the acquisition of the product can be compressed, and finally generating an MP4 video file in the H.264 coding format.
Through the steps, the target image is determined according to the batch information of the product, the video clip plan is created according to the actual application scene, the video file associated with the batch information is generated according to the created video clip plan, the CONCAT protocol file and the target image, and the video file corresponding to the product batch information and generated in a self-adaptive mode according to the scene is achieved.
And step S305, uploading the video file to a cloud storage.
And forming a video resource library by the video files generated by all batches of information, and uploading the video resource library to a cloud storage.
By the method, the video resource library is uploaded to the cloud storage, a more reliable, safer and more compliant storage mode is provided, a trust consensus mechanism among all tracing nodes is established, the video resource library is accessed at any position of the internet, and tracing requests of products in different scenes are met.
And step S306, receiving the product tracing request, and returning the video file according to the product batch information.
And receiving a tracing request of the product, and returning a video file corresponding to the product batch information.
Through the mode, a consumer can inquire the video file related to the product by scanning the code according to the label on the package, and the traditional character tracing promotion is changed into the visual node tracing.
The embodiment also provides a product tracing device, which is used for implementing the above embodiments and preferred embodiments, and the description of the device is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a product tracing apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes:
the acquisition module 61 is used for acquiring images and time information of image shooting of the product from the production of the raw materials to each stage of the product on shelf, and storing the images by taking the time information of the image shooting as an index;
the storage module 62 is connected to the acquisition module 61, and is used for acquiring the product batch of the product, determining the time information of each stage of the product according to the product batch, and querying a target image corresponding to the time information of each stage of the product from the stored image;
and the generating module 63 is connected to the storage module 62 and is configured to arrange the target images in a time sequence, generate a video file according to the target images arranged in the time sequence, and store the video file with the product batch as an index.
In one embodiment, the obtaining module 61 is configured to determine a time interval for taking pictures according to a production cycle of the product, and obtain images of the product from the production of the raw material to each stage of the product on the shelf according to the time interval, wherein the production cycle includes a planting period, a maturing period and a harvesting period.
In one embodiment, the obtaining module 61 is further configured to obtain images of the product from the production of the raw material to each stage of the product shelving, time information of the captured images, and image-related information, and store the images and the image-related information into the block chain by using the time information of the captured images as an index, where the image-related information includes a product type, a product producing area, product growth environment information, and a product inspection qualified code.
In one embodiment, the generating module 63 is configured to determine a synthesis parameter of a video file according to an application scenario of a product to be traced, and generate the video file according to a target image and the synthesis parameter arranged according to a time sequence, where the synthesis parameter includes a code rate, a frame rate, and a resolution.
In one embodiment, the storage module 62 is configured to obtain a product batch of a product, determine time information, a product type, and a product origin of each stage of the product according to the product batch, and query the stored image for a target image corresponding to the time information, the product type, and the product origin of each stage of the product.
In one embodiment, the generating module 63 is further configured to store the video file to the cloud storage by using the product batch as an index.
In one embodiment, the product tracing apparatus further includes a return module, which is configured to receive the product tracing request and return the corresponding video file according to the product batch.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
The present embodiment also provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
and S1, acquiring images and time information of the images of the products from the production of the raw materials to the stage of putting the products on shelves, and storing the images by taking the time information of the images as an index.
S2, obtaining the product batch of the product, determining the time information of each stage of the product according to the product batch, and inquiring the target image corresponding to the time information of each stage of the product from the stored image.
And S3, arranging the target images according to the time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In addition, in combination with the product tracing method in the foregoing embodiment, the embodiment of the present application may provide a storage medium to implement. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements any one of the product tracing methods in the above embodiments.
It should be understood by those skilled in the art that various features of the above embodiments can be combined arbitrarily, and for the sake of brevity, all possible combinations of the features in the above embodiments are not described, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A product tracing method is characterized by comprising the following steps:
acquiring images of products from production of raw materials to each stage of putting the products on shelves and time information for shooting the images, and storing the images by taking the time information for shooting the images as an index;
acquiring a product batch of the product, determining time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image;
arranging the target images according to a time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
2. The product tracing method of claim 1, wherein obtaining images of products from production of raw materials to various stages of the product racking comprises:
determining the time interval for taking pictures according to the production cycle of the product, and acquiring images of the product from the production of the raw materials to each stage of putting the product on shelves according to the time interval, wherein the production cycle comprises a planting period, a maturing period and a harvesting period.
3. The product tracing method according to claim 1, wherein the obtaining of images of products from production of raw materials to each stage of the product shelving and time information of the image capturing, and the storing of the images with the time information of the image capturing as an index comprises:
the method comprises the steps of obtaining images of products from production of raw materials to each stage of product racking, shooting time information and image related information, and storing the images and the image related information to a block chain by taking the time information of the images as an index, wherein the image related information comprises product types, product producing areas, product growth environment information and product inspection qualified codes.
4. The product tracing method of claim 1, wherein generating a video file from the target images arranged in time sequence comprises:
and determining synthesis parameters of the video file according to an application scene of a product to be traced, and generating the video file according to the target image and the synthesis parameters which are arranged according to the time sequence, wherein the synthesis parameters comprise a code rate, a frame rate and a resolution.
5. The product tracing method according to claim 1, wherein the obtaining of the product batch of the product and the determining of the time information of each stage of the product according to the product batch, and the querying of the target image corresponding to the time information of each stage of the product from the stored images comprises:
and acquiring a product batch of the product, determining time information, product types and product production places of all stages of the product according to the product batch, and inquiring a target image corresponding to the time information, the product types and the product production places of all stages of the product from the stored image.
6. The product tracing method of claim 1, wherein storing the video file with the product batch as an index comprises:
and storing the video file to cloud storage by taking the product batch as an index.
7. The method of claim 1, wherein storing the video file with the product lot as an index comprises:
and receiving a product tracing request, and returning a corresponding video file according to the product batch.
8. A product tracing apparatus, said apparatus comprising:
the acquisition module is used for acquiring images of products from production of raw materials to each stage of product shelving and time information of image shooting, and storing the images by taking the time information of image shooting as an index;
the storage module is used for acquiring the product batch of the product, determining the time information of each stage of the product according to the product batch, and inquiring a target image corresponding to the time information of each stage of the product from the stored image;
and the generation module is used for arranging the target images according to a time sequence, generating a video file according to the target images arranged according to the time sequence, and storing the video file by taking the product batch as an index.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the product tracing method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, wherein the computer program is configured to execute the product tracing method according to any one of claims 1 to 7 when running.
CN202011604791.0A 2020-12-29 2020-12-29 Product tracing method and device, electronic device and storage medium Pending CN112862498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011604791.0A CN112862498A (en) 2020-12-29 2020-12-29 Product tracing method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011604791.0A CN112862498A (en) 2020-12-29 2020-12-29 Product tracing method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112862498A true CN112862498A (en) 2021-05-28

Family

ID=75998336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011604791.0A Pending CN112862498A (en) 2020-12-29 2020-12-29 Product tracing method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112862498A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113812661A (en) * 2021-09-10 2021-12-21 湖北中烟工业有限责任公司 Automatic tracing method and system for sorting non-smoke substances in leaves

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948561A (en) * 2017-10-16 2018-04-20 镇江方山电子商务有限公司 With the agricultural product source tracing method and system of videograph
CN110097373A (en) * 2019-03-18 2019-08-06 杭州特股软件开发有限公司 The traceability system and method combined based on block chain with Internet of Things
CN110648142A (en) * 2018-06-07 2020-01-03 阿里巴巴集团控股有限公司 Commodity traceability link information processing method and device and electronic equipment
CN111400629A (en) * 2020-03-12 2020-07-10 合宇(上海)智能科技有限公司 Work tracing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948561A (en) * 2017-10-16 2018-04-20 镇江方山电子商务有限公司 With the agricultural product source tracing method and system of videograph
CN110648142A (en) * 2018-06-07 2020-01-03 阿里巴巴集团控股有限公司 Commodity traceability link information processing method and device and electronic equipment
CN110097373A (en) * 2019-03-18 2019-08-06 杭州特股软件开发有限公司 The traceability system and method combined based on block chain with Internet of Things
CN111400629A (en) * 2020-03-12 2020-07-10 合宇(上海)智能科技有限公司 Work tracing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113812661A (en) * 2021-09-10 2021-12-21 湖北中烟工业有限责任公司 Automatic tracing method and system for sorting non-smoke substances in leaves

Similar Documents

Publication Publication Date Title
US11129259B2 (en) Method and apparatus for multi-experience metadata translation of media content with metadata
US10972519B2 (en) Real-time video streaming to client video element
CN106134146B (en) Handle continuous multicycle content
US9838760B2 (en) Systems and methods for name-based segmented media acquisition and distribution framework on a network
US20140219634A1 (en) Video preview creation based on environment
WO2014169828A1 (en) Method, device, and system for playing surveillance video
CN103248872A (en) Video-based agricultural product source tracing method and system
US9237362B2 (en) Method and apparatus for multi-experience translation of media content with sensor sharing
US10009643B2 (en) Apparatus and method for processing media content
CN106603503B (en) The treating method and apparatus of live data
US11223856B2 (en) Method for processing streaming media data and server for processing streaming media
CN101848367B (en) File-based video live webcasting method
CN112752113B (en) Method and device for determining abnormal factors of live broadcast server
US20230045876A1 (en) Video Playing Method, Apparatus, and System, and Computer Storage Medium
CN105743971A (en) Using method of saas cloud platform applicable to new media content fusion
CN109376254A (en) Processing method, device, electronic equipment and the readable storage medium storing program for executing of data flow
US20160021404A1 (en) Method and system for transferring real-time audio/video stream
CN112862498A (en) Product tracing method and device, electronic device and storage medium
CN109218274A (en) A kind of processing method and processing device of media information
WO2015062263A1 (en) Method and apparatus for recording data of network interaction protocol
Bailey Live Video Streaming from Android-Enabled Devices to Web Browsers
CN103108228A (en) Method for identifying video contents in cross-screen mode through video images
CN106060609A (en) Method and device for acquiring picture
CN109996031B (en) Monitoring system and monitoring method
CN112235592A (en) Live broadcast method, live broadcast processing method, device and computer equipment

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