Disclosure of Invention
The invention mainly aims to provide an updating method and device of article information and a computer readable storage medium, and aims to solve the problem that an article cannot be identified by an article identification device.
In order to achieve the above object, the present invention provides an update method of article information, including the steps of:
acquiring a plurality of images of the newly added object, wherein the image acquisition angles of the newly added object in each image are different;
constructing a model of the newly added object according to each image and the image acquisition angle corresponding to the newly added object in each image;
and acquiring information of the newly added article, and sending the information and the model to each article identification device so that each article identification device stores the information and the model, wherein the information comprises at least one of an identity, a component, a price and a weight of the newly added article.
In one embodiment, the step of sending the information and the model to each item identification device comprises:
and sending the information and the model to a server so that the server sends the information and the model to each item identification device.
In one embodiment, the method for updating the item information is applied to an item information updating device, and the step of sending the information and the model to each item identification device includes:
detecting a transmission rate between an updating device of the article information and a server;
and when the transmission rate is greater than or equal to a preset transmission rate, executing the step of sending the information and the model to a server.
In an embodiment, after the step of detecting the transmission rate between the updating device of the item information and the server, the method further includes:
and when the transmission rate is less than the preset transmission rate, sending the information and the model to each item identification device.
In an embodiment, after the step of detecting the transmission rate between the updating device of the item information and the server, the method further includes:
when the transmission rate is smaller than the preset transmission rate, taking the article identification device with the transmission rate larger than or equal to the preset transmission rate as a target article identification device;
and sending the information and the model to the target article identification device, so that the information and the model are sent to the server through the target article identification device, and the server sends the information and the model to each article identification device.
In an embodiment, the step of acquiring a plurality of images of the newly added article includes:
and receiving each image of the newly added article acquired by the article identification equipment.
In an embodiment, after the step of obtaining information of the newly added article, the method further includes:
and correlating and storing the information and the model.
In order to achieve the above object, the present invention further provides an article information updating device, which includes a processor, a memory, and an article information storage program stored in the memory and operable on the processor, wherein the article information updating program, when executed by the processor, implements the steps of the article information updating method described above.
In an embodiment, the updating device of the item information is a server or an item identification device.
To achieve the above object, the present invention also provides a computer-readable storage medium storing an article-based information storage program, which when executed by a processor, implements the steps of the article information storage program method as described above.
The invention provides a method and a device for updating article information and a computer readable storage medium, which are used for acquiring a plurality of images of a newly added article, wherein the image acquisition angles of the newly added article in each image are different, so that a model of the newly added article is constructed according to each image and the acquisition angle of the newly added article in each image, then the information of the newly added article is acquired, and finally the information and the model are sent to each article identification device; because the device can send the information and the model of the newly added article to each article identification device, each article identification device can identify the article by the latest database, and the condition that the article identification device cannot identify the article is avoided.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The main solution of the embodiment of the invention is as follows: acquiring a plurality of images of the newly added object, wherein the image acquisition angles of the newly added object in the images are different; constructing a model of the newly added object according to each image and the image acquisition angle corresponding to the newly added object in each image; and acquiring information of the newly added article, and sending the information and the model to each article identification device so that each article identification device stores the information and the model, wherein the information comprises at least one of an identity, a component, a price and a weight of the newly added article.
Because the device can send the information and the model of the newly added article to each article identification device, each article identification device can identify the article by the latest database, and the condition that the article identification device cannot identify the article is avoided.
As an implementation solution, the updating device of the article information may be as shown in fig. 1.
Further, referring to fig. 1, the article information updating apparatus includes: a processor 101, e.g. a CPU, a memory 102, a communication bus 103. Wherein a communication bus 103 is used for enabling the connection communication between these components.
The memory 102 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). As shown in fig. 1, the memory 102, which is a kind of computer storage medium, may include therein an update program of the article information; and the processor 101 may be configured to call an update program of the article information stored in the memory 102, and perform the following operations:
acquiring a plurality of images of the newly added object, wherein the image acquisition angles of the newly added object in each image are different;
constructing a model of the newly added object according to each image and the image acquisition angle corresponding to the newly added object in each image;
and acquiring information of the newly added article, and sending the information and the model to each article identification device so that each article identification device stores the information and the model, wherein the information comprises at least one of an identity, a component, a price and a weight of the newly added article.
In one embodiment, the processor 101 may be configured to call an update program of the item information stored in the memory 102, and perform the following operations:
and sending the information and the model to a server so that the server sends the information and the model to each item identification device.
In one embodiment, the processor 101 may be configured to call an update program of the item information stored in the memory 102, and perform the following operations:
detecting a transmission rate between an updating device of the article information and a server;
and when the transmission rate is greater than or equal to a preset transmission rate, executing the step of sending the information and the model to a server.
In one embodiment, the processor 101 may be configured to call an update program of the item information stored in the memory 102, and perform the following operations:
and when the transmission rate is less than the preset transmission rate, sending the information and the model to each item identification device.
In one embodiment, the processor 101 may be configured to call an update program of the item information stored in the memory 102, and perform the following operations:
when the transmission rate is smaller than the preset transmission rate, taking the article identification device with the transmission rate larger than or equal to the preset transmission rate as a target article identification device;
and sending the information and the model to the target article identification device, so that the information and the model are sent to the server through the target article identification device, and the server sends the information and the model to each article identification device.
In one embodiment, the processor 101 may be configured to call an update program of the item information stored in the memory 102, and perform the following operations:
and receiving each image of the newly added article acquired by the article identification equipment.
In an embodiment, after the step of obtaining information of the newly added article, the method further includes:
and correlating and storing the information and the model.
According to the scheme, a plurality of images of the newly added article are obtained, the image acquisition angles of the newly added article in each image are different, therefore, a model of the newly added article is constructed according to each image and the acquisition angle of the newly added article in each image, then information of the newly added article is obtained, and finally the information and the model are sent to each article identification device; because the device can send the information and the model of the newly added article to each article identification device, each article identification device can identify the article by the latest database, and the condition that the article identification device cannot identify the article is avoided.
An embodiment of the article information updating method according to the present invention is proposed based on a hardware architecture of the article information updating apparatus.
Referring to fig. 2, fig. 2 is a first embodiment of the method for updating the article information according to the present invention, which includes the following steps:
step S10, acquiring a plurality of images of the newly added article, wherein the images of the newly added article in each image have different image acquisition angles;
in the present invention, the execution subject is an updating device of the article information, and the updating device of the article information may be a server or an article identification device.
The article identification device is provided with an image acquisition module, which may be a camera. The article identification device can acquire images of newly added articles at different angles through the image acquisition module, wherein the newly added articles refer to articles which do not contain information in the database. The article identification device can be provided with only one image acquisition module, and the image acquisition at different angles is carried out by placing the newly added article on the device with the turnable angle, or the image acquisition module is controlled to rotate so as to acquire images of the newly added article at different angles; of course, the article identification device may include a plurality of image capturing modules, each of which is not rotatable, and each of which has a different image capturing angle for the article.
If the updating device of the article information is a server, the article identification equipment uploads the images to the server, so that the server receives a plurality of images of the newly added article; and when the updating device of the article information is the article identification device, the article identification device establishes a model of the newly added article according to each image.
Step S20, constructing a model of the newly added article according to each image and the image acquisition angle corresponding to the newly added article in each image;
after obtaining each image, the updating device of the article information splices each image according to the newly added article in the image and the image acquisition angle of the newly added article in the image, so as to simulate a model of the newly added article, wherein the model is a space model of the newly added article, and the space model is a three-dimensional image of the article.
Step S30, obtaining information of the newly added article, and sending the information and the model to each article identification device, so that each article identification device stores the information and the model, where the information includes at least one of an identification, a component, a price, and a weight of the newly added article.
After obtaining the model of the newly added article, the article information updating device obtains information of the newly added article, where the information may include an identification of the newly added article, and the identification is the name, type, etc. of the article; the information can also comprise the components of the articles, namely the newly added articles are foods, and the components are the components of the foods; the information can also comprise the price of the newly added article, and the price can be unit price or retail price; in addition, the information may also include the weight of the newly added item. The information can be input by an information input person, namely after a model of a newly added article is obtained, the information corresponding to the model can be input, so that the information is associated with the model and is stored.
The article information updating device stores the information and the model of the new article, but the database in the article identification device does not store the information and the model of the new article, so the article information updating device determines each article identification device related to the article information updating device and sends the information and the model to each article identification device, and the database of each article identification device is updated. When the updating device of the article information is a server, the server transmits the information and the model to each article recognition device, and when the updating device of the article information is an article recognition device, the article recognition device transmits the information and the model to the server, and transmits the information and the model to other article recognition devices through the server.
After the article identification device stores the information and the model, the stored model may be used as a preset model. When a user places an article to be purchased on the article identification device, the article identification device performs image acquisition on the article to be purchased through the image acquisition module to obtain a second image, wherein the second image can be an article image at any angle. Of course, the article identification device can control the rotation of the image acquisition module to acquire an article image under good light, that is, the article identification device adjusts the acquisition angle of the image acquisition module to the article according to the light intensity under the current environment.
The article identification device stores a plurality of models, namely a plurality of preset models, obtains a second image, and then compares the second image with each preset model to obtain a model matched with the second image, specifically, after obtaining the second image, the second image needs to be compared with each preset model one by one, and the preset models can be classified into compared ones and not compared ones, it can be understood that the article to be purchased corresponding to the second image is not the article corresponding to the compared preset model; determining a target model in each unmatched preset model, wherein the target model is the preset model to be compared, and acquiring third images of the target model at multiple angles by the device, for example, six views of the target model can be used as the third images, and the six views are a front view, a back view, a top view, a bottom view, a left view and a right view respectively; and then, carrying out similarity calculation on the second image and each third image to obtain a plurality of similarities, taking the maximum similarity, if the maximum similarity is greater than a preset threshold, indicating that the information corresponding to the preset model is the information of the article to be purchased, if the maximum similarity is less than the preset model, judging that the information of the target model is not the information of the article to be purchased, setting the target model as a compared preset model, and determining the target model in each unmatched preset model to carry out a new round of comparison until the model matched with the second image is determined.
After the model matched with the second image is determined, the information associated with the matched model is the information of the article to be purchased, so that the price of the article to be purchased can be determined according to the information associated with the matched model, and then the price is output.
The article settlement modes comprise two-dimension code payment, bank card payment, meal card payment, face identification payment, eye identification payment, fingerprint identification payment, NFC payment (near field communication payment), WeChat payment and Payment treasure payment, and the article identification equipment can output the settlement modes of the articles after determining the price of the articles to be purchased, for example, the user opens the fingerprint payment, the meal card payment and the face identification payment, so the article identification equipment can output three payment modes of the fingerprint payment, the meal card payment and the face identification payment for the user to select; after the user performs the selection operation, that is, the object identification device detects the operation of completing the selection based on the object settlement mode, the target food settlement mode can be determined according to the operation, so that the food is settled according to the target object settlement mode and the price of the object, for example, if the target object settlement mode is face identification settlement, the object identification device collects the face of the user, so that the user is identified, the price of the purchased object is deducted from the balance in the account of the user, if the target object settlement mode is WeChat payment, the object identification device sends the price of the object to a WeChat payment server, so that the WeChat payment server sends a payment request to the user terminal, so that the user pays for the object based on the user terminal, and the payment of the object is completed.
In the technical scheme provided by the embodiment, a plurality of images of the newly added article are obtained, and the image acquisition angles of the newly added article in each image are different, so that a model of the newly added article is constructed according to each image and the acquisition angle of the newly added article in each image, information of the newly added article is obtained, and finally the information and the model are sent to each article identification device; because the device can send the information and the model of the newly added article to each article identification device, each article identification device can identify the article by the latest database, and the condition that the article identification device cannot identify the article is avoided.
Referring to fig. 3, fig. 3 is a second embodiment of the method for updating the item information according to the present invention, and based on the first embodiment, the step S30 includes:
step S31, detecting a transmission rate between the update device of the item information and the server;
step S32, when the transmission rate is larger than or equal to the preset transmission rate, the information and the model are sent to a server, so that the server sends the information and the model to each item identification device;
step S33, when the transmission rate is less than the preset transmission rate, sending the information and the model to each item identification device.
In the present embodiment, the execution subject is an article recognition apparatus. Be equipped with WIFI module and wireless communication module among the article identification equipment, wireless communication module can be communication module such as 4G, 5G.
Under general conditions, article identification equipment passes through the WIFI module and connects the LAN for article identification equipment establishes with the server and is connected, and LAN has the relatively poor condition of transmission rate (for example, article identification equipment flow of people is great, and a plurality of users use the LAN, cause transmission rate to be slower), if when transmitting information and model to the server through article identification equipment, transmission rate can be slower, can cause the server can not in time with the information and the model propelling movement of newly-increased article to each article identification equipment.
In this regard, the item identification device detects a transmission rate between it and the server. The article identification equipment can send information of preset data volume to the server, and can determine the transmission rate between the article identification equipment and the server when receiving the receiving completion information fed back by the server; if the transmission rate is greater than or equal to the preset transmission rate, the article identification equipment can upload information and modules at a higher rate, and at the moment, the article identification equipment uploads the information and the models to the server, so that the server sends the information and the models to other article identification equipment; and when the transmission rate is smaller than the preset transmission rate, the article identification equipment sends the information and the model to other article identification equipment through the wireless communication module, so that each article identification equipment can update the information and the model of the newly added article in time.
Further, when the transmission rate is less than the preset transmission rate, the article identification device needs to send information and a model to a plurality of other article identification devices, the workload is large, the calculation resources of the article identification device are occupied, and the normal identification work of the article identification device is responded; in response, the article identification device sends a request to other article identification devices, the request is to acquire the transmission rate between the other article identification devices and the server, when information fed back by the other article identification devices is received, the other article identification device with the maximum transmission rate is selected as a target article identification device, then the information and the model are sent to the target article identification device, so that the target article identification device sends the information and the model to the server, and then the server pushes the information and the model to the other article identification devices.
In addition, when the transmission rate is smaller than the preset transmission rate, the article identification device can obtain the states of other article identification devices, select one idle state of other article identification devices as a target article identification device, upload the information and the model to the server through the target article identification device, and send the information and the model to each article identification device through the server; or the information and the model are sent to other article identification devices through the target identification device.
In the technical scheme provided by this embodiment, the article identification device detects the transmission rate between the article identification device and the server, and compares the transmission rate with the preset transmission rate, so as to update the information and the model in a corresponding manner for different comparison results, and ensure the timely update of the information and the model of the newly added article of other article identification devices while the article identification device is in normal operation.
The present invention also provides an article information updating device, which includes a processor, a memory, and an article information storage program stored in the memory and operable on the processor, and when executed by the processor, the article information updating program implements the steps of the article information updating method according to the above embodiment.
The present invention also provides a computer-readable storage medium storing an article-based information storage program which, when executed by a processor, implements the steps of the article information storage program method according to the above embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.