Data transmission method, refrigerator, server and computer readable storage medium
By taking video data of food ingredients in the refrigerator and transmitting it to the server for identification, the problem of low food identification accuracy in the existing technology is solved, higher recognition accuracy and data transmission fluency are achieved, and security is improved.
Patent Information
- Application Number
- CN202310474467.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-10-29
AI Technical Summary
Existing refrigerator products transmit detection data through pictures or text, resulting in low food identification accuracy and insufficient data volume, which can easily lead to misidentification.
A camera is set up in the refrigerator to capture the video data of the ingredients, which is compressed and encrypted and sent to the server. The server identifies the ingredients based on the video data and calculates the average matching degree by filtering the target images at multiple moments to determine the type of ingredients.
It improves the accuracy of food ingredient identification, reduces the requirements for data transmission on the network environment, makes data transmission between the refrigerator and the server smoother, and enhances the security of data transmission.
Smart Images

Figure CN118865359A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of refrigerators, and in particular to a data transmission method, a refrigerator, a server and a computer-readable storage medium. Background Art
[0002] In the related art, for refrigerator products currently on the market, the detection data of the refrigerator is often transmitted in the form of pictures or texts, and then the food is identified based on the detection data. However, since the transmitted detection data are in the form of pictures or texts, the data volume is not comprehensive and rich, which can easily cause misidentification of food and affect the accuracy of food identification. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a data transmission method, a refrigerator, a server and a computer-readable storage medium, aiming to improve the accuracy of food identification.
[0004] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a refrigerator, wherein a camera is provided inside the refrigerator, and the data transmission method comprises:
[0005] receiving a trigger instruction;
[0006] According to the trigger instruction, the camera is used to shoot the food inside the refrigerator to obtain food video data;
[0007] Compressing the food video data to obtain video compression data;
[0008] The video compression data is sent to a server, so that the server can identify the food based on the video compression data.
[0009] According to some embodiments of the present application, after obtaining the food video data, the data transmission method further includes:
[0010] Segmenting the food video data to obtain first food video data of a first time period and second food video data of a second time period, wherein the picture corresponding to the first food video data is a static picture, and the picture corresponding to the second food video data is a dynamic picture;
[0011] The first food video data is deleted, and the second food video data to be compressed is retained.
[0012] According to some embodiments of the present application, after obtaining the video compression data, the data transmission method further includes:
[0013] The video compression data is encrypted using a preset key to obtain encrypted video compression data.
[0014] According to some embodiments of the present application, sending the video compression data to a server so that the server performs food identification based on the video compression data includes:
[0015] The video compression data is sent to a server so that the server decompresses the video compression data, selects target images corresponding to multiple moments from the video decompression data, and identifies food ingredients based on the multiple target images.
[0016] According to some embodiments of the present application, the trigger instruction is a refrigerator door opening instruction.
[0017] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a server, and the data transmission method includes:
[0018] Receiving video compression data sent from the refrigerator, wherein the video compression data is obtained by compressing food video data, and the food video data is obtained by the refrigerator shooting the food inside the refrigerator through a camera according to a trigger instruction;
[0019] The food material is identified according to the video compression data.
[0020] According to some embodiments of the present application, the step of identifying food ingredients according to the video compression data includes:
[0021] Decompressing the video compression data to obtain video decompressed data;
[0022] Filtering target images corresponding to multiple moments from the video decompression data;
[0023] Ingredients are identified based on the multiple target images.
[0024] According to some embodiments of the present application, the video compression data is obtained by encrypting the refrigerator using a preset key; before decompressing the video compression data, the data transmission method further includes:
[0025] The preset key is used to decrypt the video compression data to obtain decrypted video compression data.
[0026] According to some embodiments of the present application, the step of identifying ingredients according to the plurality of target images includes:
[0027] For each of the target images, obtaining matching degrees corresponding to a plurality of food types according to the target image recognition;
[0028] Calculating the average matching degree of each of the food types in all the target images;
[0029] The food type with the largest average matching degree is selected as the recognition result.
[0030] In a third aspect, an embodiment of the present application provides a refrigerator, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data transmission method of the first aspect described above when running the computer program.
[0031] In a fourth aspect, an embodiment of the present application provides a server, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data transmission method of the second aspect described above when running the computer program.
[0032] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the data transmission method of the first aspect or the second aspect as described above.
[0033] According to the technical solution of the embodiment of the present application, at least the following beneficial effects are achieved: first, after receiving the trigger command, the refrigerator will shoot the food inside the refrigerator through the camera to obtain food video data; then, the refrigerator will compress the food video data to obtain video compression data; then, the refrigerator will send the video compression data to the server; finally, the server will identify the food based on the video compression data. According to the technical solution of the embodiment of the present application, first, since the embodiment of the present application identifies food based on food video data, and the amount of data contained in the food video data will be much larger than the amount of data contained in the picture or text, therefore, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of food and can improve the accuracy of refrigerator food identification; in addition, since the embodiment of the present application will also compress the food video data, the requirements of the data transmission process on the network environment are reduced, making the food video data transmission between the refrigerator and the server smoother.
[0034] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0036] Figure 1is a schematic diagram of a system architecture platform for executing a data transmission method provided by an embodiment of the present application;
[0037] Figure 2 is a schematic diagram of the connection relationship between a refrigerator and a server provided in one embodiment of the present application;
[0038] Figure 3 is a flow chart of a data transmission method performed by a refrigerator side provided by an embodiment of the present application;
[0039] Figure 4 is a flow chart of a data transmission method performed by a refrigerator side provided by another embodiment of the present application;
[0040] Figure 5 is a flow chart of a data transmission method performed by a refrigerator side provided by another embodiment of the present application;
[0041] Figure 6 is a flow chart of a data transmission method performed by a server side provided by an embodiment of the present application;
[0042] Figure 7 is a flowchart of a data transmission method performed by a server side provided by another embodiment of the present application;
[0043] Figure 8 is a flowchart of a data transmission method performed by a server side provided by another embodiment of the present application;
[0044] Fig. 9 This is a flowchart of a data transmission method executed by the server side provided by another embodiment of the present application. DETAILED DESCRIPTION
[0045] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0046] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0047] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0048] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0049] In some cases, for refrigerator products currently on the market, the detection data of the refrigerator is often transmitted in the form of pictures or text, and then the food is identified based on the detection data. However, since the transmitted detection data is in the form of pictures or text, the data volume is not comprehensive and rich, which can easily cause misidentification of food and affect the accuracy of food identification.
[0050] Based on the above situation, the embodiments of the present application propose a data transmission method, a refrigerator, a server and a computer-readable storage medium, aiming to improve the accuracy of food identification.
[0051] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0052] like Figure 1 As shown, Figure 1 It is a schematic diagram of a system architecture platform for executing a data transmission method provided by an embodiment of the present application.
[0053] The system architecture platform 100 of the embodiment of the present application includes one or more processors 110 and a memory 120. Figure 1 In the figure, a processor 110 and a memory 120 are taken as an example.
[0054] The processor 110 and the memory 120 may be connected via a bus or other means. Figure 1 The example of connecting through bus is taken in the following.
[0055] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 120 may optionally include a memory 120 remotely disposed relative to the processor 110, and these remote memories may be connected to the system architecture platform 100 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0056] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the system architecture platform 100, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0057] exist Figure 1 In the system architecture platform 100 shown, the processor 110 can be used to call the data transmission program stored in the memory 120 to implement the data transmission method.
[0058] Based on the hardware structure of the above-mentioned system architecture platform 100, various embodiments of the refrigerator and server of the present application are proposed below.
[0059] like Figure 2 As shown, Figure 2 This is a schematic diagram of the connection relationship between a refrigerator and a server provided in one embodiment of the present application.
[0060] In one embodiment, the refrigerator 200 of the embodiment of the present application is provided with at least a camera 210, a communication module 230 and a controller 220, wherein the camera 210 is installed inside the refrigerator 200 and connected to the controller 220, and in addition, the controller 220 is also connected to the server 300 through the communication module 230.
[0061] It should be noted that the shooting range of the camera 210 may include but is not limited to the following situations:
[0062] The first case: the shooting range of the camera 210 can be aimed at the opening of the refrigerator 200; based on this, when the user opens the refrigerator door and puts food into the refrigerator 200, since the food will pass through the opening of the refrigerator 200, the camera 210 can shoot all the food put into the refrigerator 200; or, when the user opens the refrigerator door and takes food out of the refrigerator 200, since the food will pass through the opening of the refrigerator 200, the camera 210 can shoot all the food taken out from the refrigerator 200.
[0063] The second situation: a plurality of storage partitions are arranged inside the refrigerator 200, and each storage partition is provided with an independent camera 210, and the shooting range of each camera 210 is aimed at the storage partition where it is located; based on this, when the user opens the refrigerator door and places food into a storage partition inside the refrigerator 200, the camera 210 in the storage partition can shoot the food placed into the storage partition; or, when the user opens the refrigerator door and takes food out of a storage partition inside the refrigerator 200, the camera 210 in the storage partition can shoot the food taken out from the storage partition.
[0064] The third situation: multiple storage partitions are arranged inside the refrigerator 200, and a camera 210 is arranged outside the multiple storage partitions, and the same camera 210 is used to simultaneously photograph the multiple storage partitions; based on this, when the user opens the refrigerator door and places food into one or more storage partitions inside the refrigerator 200, the camera 210 can photograph the food placed into each storage partition; or, when the user opens the refrigerator door and takes food out of one or more storage partitions inside the refrigerator 200, the camera 210 can photograph the food taken out from each storage partition.
[0065] It can be understood that the above-mentioned storage partitions may refer to multiple partitions of different categories such as frozen storage areas, refrigerated storage areas or fresh-keeping storage areas, or may refer to multiple partitions under the same category, such as a first frozen storage area, a second frozen storage area and a third frozen storage area, etc.; the embodiment of the present application does not specifically limit the classification of storage partitions.
[0066] It can be understood that, regarding the above-mentioned camera 210, the number can be one or more, and the embodiment of the present application does not specifically limit the number of cameras 210.
[0067] In addition, it should be noted that the above-mentioned communication module 230 can be a wireless communication module, such as a WIFI communication module, a 4G communication module or a 5G communication module, etc.; specifically, after the refrigerator 200 obtains food video data through the camera 210, the food video data can be uploaded to the cloud server 300 through the wireless communication module for food identification.
[0068] In addition, it should be noted that the controller 220 may include but is not limited to Figure 1 The processor and memory shown in .
[0069] In addition, it should be noted that, regarding the above-mentioned server 300, after receiving the food video data sent by the refrigerator 200, the server 300 will respond by identifying the food according to the food video data, thereby obtaining an identification result.
[0070] It is understandable that after the server 300 determines the recognition result, the recognition result can be fed back to the refrigerator 200, or the recognition result can be sent to the user's mobile phone so that the user can view the current quantity and category of ingredients in the refrigerator 200.
[0071] In addition, it should be noted that the refrigerator 200 of the embodiment of the present application also includes but is not limited to a refrigerator door sensor, which can detect the open or closed state of the refrigerator door in real time. Specifically, when the refrigerator door sensor detects that the refrigerator door switches from a closed state to an open state, it indicates that the user may put food into the refrigerator 200 or may take food out of the refrigerator 200. In this case, the refrigerator 200 can respond by starting the camera 210 to shoot the food inside the refrigerator 200.
[0072] It is understandable that the above-mentioned refrigerator door sensor may be a touch switch, a camera device, or other devices, and the embodiment of the present application does not specifically limit the structural type of the refrigerator door sensor. For example, when a touch switch is used as a refrigerator door sensor, if the touch switch is closed, it indicates that the refrigerator door sensor is in a closed state, and if the touch switch is disconnected, it indicates that the refrigerator door sensor is in an open state. When a camera device is used as a refrigerator door sensor, the embodiment of the present application can capture the refrigerator door image through the camera device, and then perform image analysis on the refrigerator door image to obtain whether the current refrigerator door is in a closed state or an open state.
[0073] Those skilled in the art will appreciate that the structure described above does not limit the refrigerator 200 and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0074] Based on the above-mentioned system architecture platform 100, the hardware structure of the refrigerator and the server, various embodiments of the data transmission method on the refrigerator side of the present application are proposed below.
[0075] like Figure 3 As shown, Figure 3 1 is a flowchart of a data transmission method on the refrigerator side provided by an embodiment of the present application. The data transmission method can be applied to a refrigerator with a camera disposed inside in any of the above embodiments, including but not limited to step S110, step S120, step S130 and step S140.
[0076] Step S110, receiving a trigger instruction;
[0077] Step S120: photographing the food inside the refrigerator through a camera according to the trigger instruction to obtain food video data;
[0078] Step S130, compressing the food video data to obtain video compression data;
[0079] Step S140: Send the video compression data to the server, so that the server can identify the food based on the video compression data.
[0080] In one embodiment, first, after receiving a trigger instruction, the refrigerator will start the camera based on the trigger instruction to shoot the food inside the refrigerator, thereby obtaining food video data; then, since the data packet of the food video data is large, the refrigerator will compress the food video data, thereby obtaining video compression data; then, the refrigerator will send the video compression data to the server; finally, the server will identify the food based on the video compression data.
[0081] According to the technical solution of the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data is much larger than the amount of data contained in the picture or text, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; in addition, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother.
[0082] It should be noted that the trigger instruction may be a refrigerator door opening instruction. Specifically, when the refrigerator door sensor detects that the refrigerator door switches from a closed state to an open state, the refrigerator receives the refrigerator door opening instruction, indicating that the user may put food into the refrigerator or take food out of the refrigerator. In this case, the refrigerator may respond by starting the camera to shoot the food inside the refrigerator.
[0083] In addition, if Figure 4 As shown, Figure 4 1 is a flowchart of a refrigerator-side data transmission method provided by another embodiment of the present application. After the above step S120, the refrigerator-side data transmission method of the embodiment of the present application further includes but is not limited to step S210 and step S220.
[0084] Step S210, segmenting the food video data to obtain first food video data of a first time period and second food video data of a second time period, wherein the picture corresponding to the first food video data is a static picture, and the picture corresponding to the second food video data is a dynamic picture;
[0085] Step S220: Delete the first food video data and retain the second food video data to be compressed.
[0086] In one embodiment, after the refrigerator obtains the food video data through the camera, the food video data will also be segmented. Specifically, the embodiment of the present application will segment the food video data into first food video data in a first time period of a static picture and second food video data in a second time period of a dynamic picture. Since the pictures corresponding to the first food video data are all static pictures, the pictures are all repeated pictures, so their reference value is not high. In this regard, the embodiment of the present application can delete the first food video data, that is, the first food video data is not sent to the server; and since the pictures corresponding to the second food video data are dynamic pictures, the pictures are not repeated pictures, so the second food video data can reflect the pictures of multiple angles of the food, so its reference value is high. In this regard, the embodiment of the present application can retain the second food video data and then send the second food video data to the server.
[0087] For example, after the user opens the refrigerator door, puts ingredient A into the refrigerator, and then leaves the refrigerator to get ingredient B in the kitchen without closing the refrigerator door, and then returns to the refrigerator to put ingredient B into the refrigerator, and finally closes the refrigerator door. In this regard, since the camera is always in a shooting state from the time when the user puts down ingredient A and leaves the refrigerator to the time when the user returns to the refrigerator to continue to put in ingredient B, the video data captured during this period are all static repeated images, and their reference value is low, so the embodiment of the present application can delete the video segments captured during this period. In addition, since the user puts in ingredients A and B, ingredients A and B will change their position or angle as the hand holds them, so that the camera can capture multiple positions or multiple angles of ingredients A and B, so the reference value of the video data captured by the camera during the time when the user puts in ingredients A and B is high, so the embodiment of the present application can retain the video segments captured during this period.
[0088] In addition, if Figure 5 As shown, Figure 5 1 is a flowchart of a refrigerator-side data transmission method provided by another embodiment of the present application. After the above step S130, the refrigerator-side data transmission method of the embodiment of the present application further includes but is not limited to step S310 and step S320.
[0089] Step S310: Encrypt the video compression data using a preset key;
[0090] Step S320: Obtain encrypted video compression data.
[0091] In one embodiment, after compressing the food video data to obtain video compression data, the refrigerator of the embodiment of the present application will also transmit the food video data through a specific communication protocol, that is, the video compression data is encrypted using a preset key, thereby obtaining encrypted video compression data, which can improve the security of food video data transmission.
[0092] It should be noted that the above-mentioned preset key is a parameter that can be input into an algorithm for converting plain text into cipher text or cipher text into plain text. Among them, the key can be divided into a symmetric key and an asymmetric key.
[0093] In addition, it should be noted that, since the server needs to decrypt the encrypted video compression data after receiving the encrypted video compression data, the preset key will be stored in the refrigerator and the server at the same time.
[0094] Based on the refrigerator-side data transmission methods of the above-mentioned various embodiments, various embodiments of the server-side data transmission method of the present application are proposed below.
[0095] like Figure 6 As shown, Figure 6 4 is a flow chart of a data transmission method performed by a server side provided by an embodiment of the present application. The data transmission method can be applied to the server of any of the above embodiments, including but not limited to step S410 and step S420.
[0096] Step S410, receiving video compression data sent from the refrigerator, wherein the video compression data is obtained by compressing food video data, and the food video data is obtained by the refrigerator shooting the food inside the refrigerator through a camera according to a trigger instruction;
[0097] Step S420: identifying food ingredients based on the video compression data.
[0098] In one embodiment, first, after receiving a trigger instruction, the refrigerator will start the camera based on the trigger instruction to shoot the food inside the refrigerator, thereby obtaining food video data; then, since the data packet of the food video data is large, the refrigerator will compress the food video data, thereby obtaining video compression data; then, the refrigerator will send the video compression data to the server; finally, the server will identify the food based on the video compression data.
[0099] According to the technical solution of the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data is much larger than the amount of data contained in the picture or text, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; in addition, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother.
[0100] It should be noted that the trigger instruction may be a refrigerator door opening instruction. Specifically, when the refrigerator door sensor detects that the refrigerator door switches from a closed state to an open state, the refrigerator receives the refrigerator door opening instruction, indicating that the user may put food into the refrigerator or take food out of the refrigerator. In this case, the refrigerator may respond by starting the camera to shoot the food inside the refrigerator.
[0101] It is worth noting that since the data transmission method executed by the server side in the embodiment of the present application corresponds to the data transmission method executed by the refrigerator side in the above-mentioned embodiment, the specific implementation manner and technical effects of the data transmission method executed by the server side in the embodiment of the present application can refer to the specific implementation manner and technical effects of the data transmission method executed by the refrigerator side in any of the above-mentioned embodiments.
[0102] like Figure 7 As shown, Figure 7 The flowchart of the data transmission method performed by the server side is provided in one embodiment of the present application. The above step S420 of identifying food ingredients according to the video compression data includes but is not limited to step S510, step S520 and step S530.
[0103] Step S510, decompressing the video compressed data to obtain video decompressed data;
[0104] Step S520, selecting target images corresponding to multiple moments from the video decompression data;
[0105] Step S530: identifying ingredients according to multiple target images.
[0106] In one embodiment, after the server receives the video compression data sent by the refrigerator, it will respond by decompressing the video compression data to obtain video decompressed data; then, the server will filter the images from the video decompressed data to filter out multiple target images at different times; finally, the server will perform image analysis on multiple target images to identify the types of food in the images.
[0107] It should be noted that, in addition to being able to identify the type of food in the screen, the above-mentioned food identification based on multiple target screens can also identify whether the user is putting in or taking out food. Specifically, the server of the embodiment of the present application will also sort the multiple target screens based on the chronological order, thereby obtaining multiple sorted target screens; then, the server will determine the movement trajectory of the food in the target screen based on the sorted multiple target screens; finally, the server will determine the access status of the food based on the movement trajectory of the food in the multiple target screens.
[0108] In addition, it should be noted that regarding the above-mentioned food movement trajectory, when the food movement trajectory is the trajectory of the food entering the refrigerator, the server can determine that the access status of the food is the storage status; when the food movement trajectory is the trajectory of the food leaving the refrigerator, the server can determine that the access status of the food is the removal status.
[0109] In addition, it should be noted that the above-mentioned multiple target screens may be two, three, or more, and the embodiment of the present application does not specifically limit the number of target screens.
[0110] In addition, it should be noted that regarding the screening process of the above-mentioned multiple target images, the embodiment of the present application can screen out target images corresponding to multiple moments from the video decompression data according to a preset interval duration, that is, the duration between two adjacent target images is a fixed duration.
[0111] like Figure 8 As shown, Figure 8 Flow chart of a data transmission method performed by a server side provided by an embodiment of the present application. In the case where the video compression data is obtained by encrypting the refrigerator with a preset key, before the above step S510, the data transmission method of the embodiment of the present application also includes but is not limited to step S610 and step S620.
[0112] Step S610: Decrypt the video compression data using a preset key;
[0113] Step S620: Obtain decrypted video compression data.
[0114] In one embodiment, after compressing the food video data to obtain the video compression data, the refrigerator of the embodiment of the present application will also transmit the food video data through a specific communication protocol, that is, encrypt the video compression data using a preset key, thereby obtaining the encrypted video compression data, which can improve the security of food video data transmission. Therefore, when the server receives the encrypted video compression data, it will respond to decrypt the video compression data using the preset key, thereby obtaining the decrypted video compression data.
[0115] It should be noted that the above-mentioned preset key is a parameter that can be input into an algorithm for converting plain text into cipher text or cipher text into plain text. Among them, the key can be divided into a symmetric key and an asymmetric key.
[0116] In addition, it should be noted that, since the server needs to decrypt the encrypted video compression data after receiving the encrypted video compression data, the preset key will be stored in the refrigerator and the server at the same time.
[0117] like Fig. 9 As shown, Fig. 9 The flowchart of the data transmission method performed by the server side is provided by an embodiment of the present application. The step S530 of identifying ingredients according to multiple target images includes but is not limited to step S710, step S720 and step S730.
[0118] Step S710: for each target screen, obtain the matching degrees corresponding to multiple food types according to the target screen recognition;
[0119] Step S720, calculating the average matching degree of each food type in all target images;
[0120] Step S730: Select the food type with the largest average matching degree as the recognition result.
[0121] In one embodiment, after the server selects target images corresponding to multiple moments from the video decompression data, it will perform image recognition for multiple target images one by one. Specifically, the server of the embodiment of the present application will identify the matching degrees corresponding to multiple types of ingredients from each target image, such as the matching degrees of ingredients A, B, and C; then, the server will calculate the average matching degree of each type of ingredient in all target images, for example, calculating the first average matching degree of ingredient A in all target images, calculating the second average matching degree of ingredient B in all target images, and calculating the third average matching degree of ingredient C in all target images; then, the server compares the average matching degree of each ingredient, for example, comparing the numerical values of the first average matching degree, the second average matching degree, and the third average matching degree. If the numerical value is higher, it indicates that the matched ingredients have the highest similarity, then the server can select the type of ingredient with the largest average matching degree as the recognition result.
[0122] Based on the data transmission methods of the above-mentioned embodiments, various embodiments of the controller, refrigerator, server and computer-readable storage medium of the present application are respectively proposed below.
[0123] In addition, an embodiment of the present application provides a controller, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor.
[0124] The processor and the memory may be connected via a bus or other means.
[0125] It should be noted that the controller in this embodiment may include: Figure 1 The processor and memory in the illustrated embodiment both belong to the same inventive concept, and therefore both have the same implementation principles and beneficial effects, which will not be described in detail here.
[0126] The non-transitory software program and instructions required to implement the data transmission method of the above embodiment are stored in the memory, and when executed by the processor, the data transmission method of the above embodiment is executed.
[0127] According to the technical solution of the controller of the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data will be much larger than the amount of data contained in the picture or text, therefore, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; secondly, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother; in addition, since the embodiment of the present application also encrypts the ingredient video data, the security of the transmission of ingredient video data can be improved.
[0128] It is worth noting that since the controller of the embodiment of the present application can execute the data transmission method on the refrigerator side or the server side of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the controller of the embodiment of the present application can refer to the specific implementation methods and technical effects of the data transmission method on the refrigerator side or the server side of any of the above-mentioned embodiments.
[0129] In addition, an embodiment of the present application further provides a refrigerator, comprising a controller of the above embodiment, wherein the controller executes the data transmission method on the refrigerator side of any of the above embodiments when running a computer program.
[0130] According to the technical solution of the refrigerator of the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data will be much larger than the amount of data contained in the picture or text, therefore, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; secondly, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother; in addition, since the embodiment of the present application also encrypts the ingredient video data, the security of the transmission of ingredient video data can be improved.
[0131] It is worth noting that since the refrigerator of the embodiment of the present application includes the controller of the above-mentioned embodiment, and the controller of the above-mentioned embodiment can execute the data transmission method on the refrigerator side of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the refrigerator of the embodiment of the present application can refer to the specific implementation methods and technical effects of the data transmission method on the refrigerator side of any of the above-mentioned embodiments.
[0132] In addition, an embodiment of the present application further provides a server, comprising a controller of the above embodiment, wherein the controller executes the data transmission method on the server side of any of the above embodiments when running a computer program.
[0133] According to the technical solution of the server in the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data is much larger than the amount of data contained in the picture or text, the amount of data in the embodiment of the present application is more comprehensive and rich, which is beneficial to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; secondly, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother; in addition, since the embodiment of the present application also encrypts the ingredient video data, the security of the transmission of ingredient video data can be improved.
[0134] It is worth noting that since the server of the embodiment of the present application includes the controller of the above-mentioned embodiment, and the controller of the above-mentioned embodiment can execute the data transmission method on the server side of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the server of the embodiment of the present application can refer to the specific implementation methods and technical effects of the data transmission method on the server side of any of the above-mentioned embodiments.
[0135] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned refrigerator-side or server-side data transmission method. Figures 3 to 9 The method steps in .
[0136] According to the technical solution of the computer-readable storage medium of the embodiment of the present application, firstly, since the embodiment of the present application identifies ingredients based on ingredient video data, and the amount of data contained in the ingredient video data will be much larger than the amount of data contained in the picture or text, therefore, the amount of data in the embodiment of the present application will be more comprehensive and rich, which is conducive to the identification of ingredients and can improve the accuracy of identifying refrigerator ingredients; secondly, since the embodiment of the present application also compresses the ingredient video data, the requirements of the data transmission process on the network environment are reduced, making the transmission of ingredient video data between the refrigerator and the server smoother; in addition, since the embodiment of the present application also encrypts the ingredient video data, the security of the transmission of ingredient video data can be improved.
[0137] It is worth noting that since the computer-readable storage medium of the embodiment of the present application can execute the data transmission method on the refrigerator side or the server side of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the computer-readable storage medium of the embodiment of the present application can refer to the specific implementation methods and technical effects of the data transmission method on the refrigerator side or the server side of any of the above-mentioned embodiments.
[0138] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0139] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions under the shared conditions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A data transmission method, characterized in that: Applied to a refrigerator, wherein a camera is provided inside the refrigerator, the data transmission method comprises: receiving a trigger instruction; According to the trigger instruction, the camera is used to shoot the food inside the refrigerator to obtain food video data; Compressing the food video data to obtain video compression data; The video compression data is sent to a server, so that the server can identify the food based on the video compression data.
2. The data transmission method according to claim 1, characterized in that: After obtaining the food video data, the data transmission method further includes: Segmenting the food video data to obtain first food video data of a first time period and second food video data of a second time period, wherein the picture corresponding to the first food video data is a static picture, and the picture corresponding to the second food video data is a dynamic picture; The first food video data is deleted, and the second food video data to be compressed is retained.
3. The data transmission method according to claim 1, characterized in that: After obtaining the video compression data, the data transmission method further includes: The video compression data is encrypted using a preset key to obtain encrypted video compression data.
4. The data transmission method according to claim 1, characterized in that: The step of sending the video compression data to a server so that the server can identify the food based on the video compression data includes: The video compression data is sent to a server so that the server decompresses the video compression data, selects target images corresponding to multiple moments from the video decompression data, and identifies food ingredients based on the multiple target images.
5. The data transmission method according to any one of claims 1 to 4, characterized in that: The trigger instruction is a refrigerator door opening instruction.
6. A data transmission method, characterized in that: Applied to a server, the data transmission method includes: Receiving video compression data sent from the refrigerator, wherein the video compression data is obtained by compressing food video data, and the food video data is obtained by the refrigerator shooting the food inside the refrigerator through a camera according to a trigger instruction; The food material is identified according to the video compression data.
7. The data transmission method according to claim 6, characterized in that: The step of identifying food ingredients according to the video compression data includes: Decompressing the video compression data to obtain video decompressed data; Filtering target images corresponding to multiple moments from the video decompression data; Ingredients are identified based on the multiple target images.
8. The data transmission method according to claim 7, characterized in that: The video compression data is encrypted by the refrigerator using a preset key; Before decompressing the video compressed data, the data transmission method further includes: The preset key is used to decrypt the video compression data to obtain decrypted video compression data.
9. The data transmission method according to claim 7 or 8, characterized in that: The identifying of ingredients according to the plurality of target images comprises: For each of the target images, obtaining matching degrees corresponding to a plurality of food types according to the target image recognition; Calculating the average matching degree of each of the food types in all the target images; The food type with the largest average matching degree is selected as the recognition result.
10. A refrigerator, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data transmission method according to any one of claims 1 to 5 when executing the computer program.
11. A server, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data transmission method according to any one of claims 6 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the data transmission method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image recognition method, image recognition device and refrigerator
CN110929658A
Refrigerator control method, refrigerator and computer readable storage medium
CN113280560A
Video stream pushing method and electronic equipment
CN114390312A
Low-flow 5G network video monitoring method, medium and system
CN115379258A
