Method, device, computer equipment and readable storage medium for uploading dish pictures
It generates image upload instructions by detecting and comparing operating gestures, receives and displays target images, solves the problem of restaurant staff needing to upload images repeatedly, improves upload efficiency and success rate, and avoids negative impact on dish sales.
Patent Information
- Application Number
- CN202110765267.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2038-11-27
AI Technical Summary
Restaurant staff need to re-upload each rejected dish image separately, resulting in low image upload efficiency and low success rate, which affects dish sales.
By detecting the operating gestures on the dish display page to be uploaded and comparing it with the preset gestures, an image upload instruction carrying the dish information is generated, the target image is received and displayed at the target location, avoiding the need for staff to upload images manually.
It improves the efficiency and success rate of image uploading and reduces the impact on dish sales.
Smart Images

Figure CN113296680B
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 27, 2018, with application number 201811427279.6 and application name “Method, device, computer equipment and readable storage medium for uploading food pictures”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present invention relates to the field of Internet technology, and in particular to a method, device, computer equipment and readable storage medium for uploading food pictures. Background Art
[0003] With the rapid development of Internet technology and the increasing popularity of smart terminals, people's lives and work are closely related to smart terminals. At present, smart terminals provide users with a variety of conveniences. For example, smart terminals provide electronic payment, mobile phone ordering and other functions. Therefore, more and more restaurants are modernized based on Internet technology. Generally speaking, smart terminals will provide restaurants with applications for ordering. In order to allow users to see the various dishes provided in the restaurant in the application, the restaurant will generate an electronic menu and provide users with the name, price, picture and other information of the restaurant's products based on the electronic menu in the application, so that users can decide which dishes to order in the application according to the electronic menu, thereby realizing ordering based on smart terminals.
[0004] In the related art, considering that some dishes may not be well known by users, resulting in low sales of these dishes, when a restaurant generates an electronic menu, staff usually upload reference pictures of each dish in the application separately, so that for some uncommon dishes, users can understand the dishes through reference pictures, thereby achieving sales of the dishes.
[0005] In the process of implementing the present invention, the inventors found that the related art has at least the following problems:
[0006] When restaurant staff upload pictures of dishes to the application, the application will review the pictures. If the content, resolution, size and other data of the picture do not meet the requirements of the application, the picture will be rejected and the dishes without pictures cannot be sold. The staff will need to re-upload pictures of each rejected dish, resulting in low efficiency of picture uploading and low success rate of picture uploading, which affects the sales of dishes. Summary of the invention
[0007] In view of this, the present invention provides a method, device, computer equipment and readable storage medium for uploading food pictures, the main purpose of which is to solve the problem that the staff currently need to re-upload the picture of each rejected dish separately, resulting in low efficiency of picture uploading, low success rate of picture uploading, and affecting the sales volume of dishes.
[0008] According to a first aspect of the present invention, a method for uploading a dish image is provided, the method comprising:
[0009] When it is detected that a display page of dishes to be uploaded is triggered, obtaining an operation gesture that triggers the display page of dishes to be uploaded, wherein the display page of dishes to be uploaded displays dish information of at least one dish to be uploaded, and the dish information includes at least a dish identifier and a dish name;
[0010] Determine a preset gesture, and compare the operation gesture with the preset gesture, wherein the preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture;
[0011] If the operation gesture is consistent with the preset gesture, a picture upload instruction carrying the dish information is generated, and the picture upload instruction is transmitted;
[0012] A target image uploaded to a target location indicated by the dish identifier is received, and the target image is displayed at the target location. The target image is determined and extracted according to the dish name.
[0013] In another embodiment, when it is detected that the display page of the dish to be uploaded is triggered, before obtaining the operation gesture that triggers the display page of the dish to be uploaded, the process includes:
[0014] When it is detected that the user requests to display the dishes to be uploaded, a request for displaying the dishes to be uploaded is generated, and the request for displaying the dishes to be uploaded is transmitted, wherein the request for displaying the dishes to be uploaded carries a store logo;
[0015] Receive the returned dish information of the dish to be uploaded, determine a preset display method, and generate the dish display page to be uploaded including the dish information according to the preset display method.
[0016] In another embodiment, the determining a preset gesture and comparing the operation gesture with the preset gesture includes:
[0017] Recognize the operation gesture and determine the moving direction of the operation gesture;
[0018] A preset direction of the preset gesture is obtained, and the moving direction is compared with the preset direction.
[0019] According to a second aspect of the present invention, a method for uploading a dish image is provided, the method comprising:
[0020] When receiving a picture upload instruction, obtaining dish information of the dish to be uploaded carried by the picture upload instruction, the dish information at least including a dish identifier and a dish name;
[0021] Acquire at least one keyword tag, and determine a target keyword tag corresponding to the dish name from the at least one keyword tag, wherein a target similarity between the target keyword tag and the dish name satisfies a similarity threshold requirement;
[0022] The target image corresponding to the target keyword tag is extracted, and the target image is uploaded to the target location indicated by the dish identifier.
[0023] In another embodiment, when receiving the picture upload instruction, before obtaining the dish information of the dish to be uploaded indicated by the picture upload instruction, the method includes:
[0024] When receiving a request for displaying dishes to be uploaded, extracting information from the request for displaying dishes to be uploaded, and obtaining a store identifier from the request for displaying dishes to be uploaded;
[0025] Performing data query based on the store identification to obtain a plurality of dish data corresponding to the store identification, wherein the dish data at least includes a dish identification, a dish name, and a dish picture;
[0026] Detecting the plurality of dish data, and extracting target dish data whose dish picture is a null value from the plurality of dish data;
[0027] The dish identifier and the dish name of the target dish data are obtained, the dish identifier and the dish name of the target dish data are used as the dish information of the dish to be uploaded, and the dish information of the dish to be uploaded is returned.
[0028] In another embodiment, obtaining at least one keyword tag and determining a target keyword tag corresponding to the dish name in the at least one keyword tag includes:
[0029] Perform keyword extraction on the dish name to obtain the name keyword of the dish name;
[0030] Calculating the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity;
[0031] Comparing the at least one character similarity with the similarity threshold, and extracting a target similarity greater than the similarity threshold from the at least one character similarity;
[0032] A keyword tag indicated by the target similarity is extracted from at least one keyword tag as the target keyword tag.
[0033] In another embodiment, calculating the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity includes:
[0034] For any keyword tag among the at least one keyword tag, counting the number of target characters that overlap between the keyword tag and the name keyword;
[0035] Counting the total number of characters of the name keyword, calculating the ratio of the target number of characters to the total number of characters, and using the ratio as the character similarity between the keyword tag and the name keyword;
[0036] The above process of calculating the character similarity between the keyword tag and the name keyword is repeated to obtain the at least one character similarity.
[0037] In another embodiment, extracting a target image corresponding to the target keyword tag and uploading the target image to a target location indicated by the dish identifier includes:
[0038] Obtain the image address corresponding to the target keyword tag, and extract the target image from the image address;
[0039] Determine the target location indicated by the dish logo, and transmit the target image to the target location.
[0040] According to a third aspect of the present invention, a device for uploading a dish image is provided, the device comprising:
[0041] an acquisition module, configured to acquire, when detecting that a display page of dishes to be uploaded is triggered, an operation gesture that triggers the display page of dishes to be uploaded, wherein the display page of dishes to be uploaded displays dish information of at least one dish to be uploaded, wherein the dish information includes at least a dish identifier and a dish name;
[0042] A comparison module, used to determine a preset gesture, and compare the operation gesture with the preset gesture, wherein the preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture;
[0043] A generating module, configured to generate a picture uploading instruction carrying the dish information if the operation gesture is consistent with the preset gesture, and transmit the picture uploading instruction;
[0044] A display module is used to receive a target image uploaded to a target location indicated by the dish identifier, and to display the target image at the target location. The target image is determined and extracted according to the dish name.
[0045] In another embodiment, the apparatus comprises:
[0046] A transmission module, for generating a request for displaying the dishes to be uploaded when detecting that a user requests to display the dishes to be uploaded, and transmitting the request for displaying the dishes to be uploaded, wherein the request for displaying the dishes to be uploaded carries a store logo;
[0047] The receiving module is used to receive the returned dish information of the dish to be uploaded, determine a preset display method, and generate a display page of the dish to be uploaded including the dish information according to the preset display method.
[0048] In another embodiment, the comparison module comprises:
[0049] A recognition unit, used to recognize the operation gesture and determine the moving direction of the operation gesture;
[0050] The comparison unit is used to obtain a preset direction of the preset gesture and compare the moving direction with the preset direction.
[0051] According to a fourth aspect of the present invention, a device for uploading a dish image is provided, the device comprising:
[0052] An acquisition module, configured to, when receiving a picture upload instruction, acquire dish information of a dish to be uploaded carried in the picture upload instruction, wherein the dish information at least includes a dish identifier and a dish name;
[0053] A determination module, configured to obtain at least one keyword tag, and determine a target keyword tag corresponding to the dish name from the at least one keyword tag, wherein a target similarity between the target keyword tag and the dish name satisfies a similarity threshold requirement;
[0054] The uploading module is used to extract the target image corresponding to the target keyword tag and upload the target image to the target location indicated by the dish identification.
[0055] In another embodiment, the apparatus comprises:
[0056] An extraction module, configured to extract information from a dish display request to be uploaded when receiving the dish display request to be uploaded, and obtain a store identifier from the dish display request to be uploaded;
[0057] A query module, used to perform data query based on the store identifier, and obtain a plurality of dish data corresponding to the store identifier, wherein the dish data at least includes a dish identifier, a dish name, and a dish picture;
[0058] A detection module, used to detect the plurality of dish data, and extract target dish data whose dish image is a null value from the plurality of dish data;
[0059] The return module is used to obtain the dish identifier and dish name of the target dish data, use the dish identifier and dish name of the target dish data as the dish information of the dish to be uploaded, and return the dish information of the dish to be uploaded.
[0060] In another embodiment, the determining module includes:
[0061] An extraction unit, used to extract keywords from the dish name to obtain the name keywords of the dish name;
[0062] a calculation unit, configured to calculate the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity;
[0063] A comparing unit, configured to compare the at least one character similarity with the similarity threshold, and extract a target similarity greater than the similarity threshold from the at least one character similarity;
[0064] The determination unit is configured to extract the keyword tag indicated by the target similarity from at least one keyword tag as the target keyword tag.
[0065] In another embodiment, the calculation unit is used to count the target number of overlapping characters between the keyword tag and the name keyword for any one of the at least one keyword tag; count the total number of characters of the name keyword, calculate the ratio of the target number of characters to the total number, and use the ratio as the character similarity between the keyword tag and the name keyword; repeat the above process of calculating the character similarity between the keyword tag and the name keyword to obtain the at least one character similarity.
[0066] In another embodiment, the upload module includes:
[0067] An extraction unit, configured to obtain a picture address corresponding to the target keyword tag, and extract the target picture at the picture address;
[0068] A transmission unit is used to determine the target position indicated by the dish logo and transmit the target image to the target position.
[0069] According to a fifth aspect of the present invention, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first and second aspects when executing the computer program.
[0070] According to a sixth aspect of the present invention, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first and second aspects above are implemented.
[0071] Through the above technical scheme, the present invention provides a method, device, computer equipment and readable storage medium for uploading dishes. Compared with the current method in which staff need to re-upload the pictures of each rejected dish separately, when the present invention detects that the display page of the dishes to be uploaded is triggered, the operation gesture that triggers the display page of the dishes to be uploaded is obtained, and when the operation gesture is consistent with the preset gesture, a picture upload instruction carrying the dish information is generated and transmitted, and a target picture received after the transmission of the picture upload instruction is received, and the target picture is displayed at the target position, so that after detecting the operation gesture, the terminal can directly receive the target picture obtained by the server according to the dish information and upload the target picture, without the need for staff to manually upload the pictures of the dishes, thereby improving the uploading efficiency of the pictures, and the success rate of picture uploading is high, thereby avoiding affecting the sales of the dishes.
[0072] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0074] Figure 1A A schematic diagram of a method for uploading a dish image provided by an embodiment of the present invention is shown;
[0075] Figure 1B A schematic diagram of a method for uploading a dish image provided by an embodiment of the present invention is shown;
[0076] Figure 2A A schematic diagram of a method for uploading a dish image provided by an embodiment of the present invention is shown;
[0077] Figure 2BA schematic diagram of a method for uploading a dish image provided by an embodiment of the present invention is shown;
[0078] Figure 3A A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0079] Figure 3B A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0080] Figure 3C A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0081] Figure 4A A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0082] Figure 4B A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0083] Figure 4C A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0084] Figure 4D A schematic diagram showing the structure of a device for uploading a dish image provided by an embodiment of the present invention is shown;
[0085] Figure 5 A schematic diagram of the device structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0086] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0087] The embodiment of the present invention provides a method for uploading a dish image, which can generate and transmit a picture upload instruction carrying dish information when an operation gesture is consistent with a preset gesture, receive a target picture received after transmitting the picture upload instruction, and display the target picture at a target position, so that after detecting the operation gesture, the terminal can directly receive the target picture obtained by the server according to the dish information, and upload the target picture, without the need for staff to manually upload the dish picture, thereby improving the uploading efficiency of the picture, and the success rate of the picture upload is high, so as to avoid affecting the sales volume of the dish, such as Figure 1A As shown, the method is applied to a terminal, comprising:
[0088] 101. When it is detected that a display page of dishes to be uploaded is triggered, an operation gesture for triggering the display page of dishes to be uploaded is obtained. The display page of dishes to be uploaded displays dish information of at least one dish to be uploaded. The dish information includes at least a dish identifier and a dish name.
[0089] In an embodiment of the present invention, in order to allow users to directly upload pictures of dishes to be uploaded in the dish display page through simple operations, the gesture that triggers the dish display page to be uploaded is obtained to identify the user's instructions and read the user's intentions, so as to achieve the uploading of the dish pictures. Specifically, when it is detected that the dish display page to be uploaded is triggered, in order to identify the user's behavior, it is necessary to obtain the operation gesture that triggers the dish display page to be uploaded, and then perform the corresponding operation by identifying the operation gesture.
[0090] 102. Determine a preset gesture, and compare the operation gesture with the preset gesture. The preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture.
[0091] In the embodiment of the present invention, after obtaining the operation gesture, in order to identify the operation gesture, a preset gesture can be set in the terminal, and the operation gesture is compared with the preset gesture, so as to realize the recognition of the operation gesture. Among them, the preset gesture can be one or more, that is, the preset gesture can be one or more of the pull-down gesture, the shake gesture and the sliding gesture. The embodiment of the present invention does not specifically limit the number of preset gestures.
[0092] 103. If the operation gesture is consistent with the preset gesture, a picture upload instruction carrying the dish information is generated and the picture upload instruction is transmitted.
[0093] In an embodiment of the present invention, if the operation gesture is consistent with the preset gesture, it means that the user wishes to upload a dish image for the dish to be uploaded. In order for the server to determine which dishes to upload images for when receiving the picture upload instruction, the terminal carries the dish information in the generated picture upload instruction and transmits the generated picture upload instruction.
[0094] 104. Receive a target image uploaded to a target location indicated by a dish identifier, display the target image at the target location, and determine and extract the target image based on the dish name.
[0095] In an embodiment of the present invention, after the terminal transmits the generated image upload instruction to the server, the server will search for the target image according to the dish information carried in the image upload instruction, and upload it to the target location indicated by the dish identifier. Therefore, the terminal will receive the target image uploaded to the target location indicated by the dish identifier, and display the target image at the target location.
[0096] The method provided by the embodiment of the present invention, when detecting that the display page of the dish to be uploaded is triggered, obtains the operation gesture that triggers the display page of the dish to be uploaded, and when the operation gesture is consistent with the preset gesture, generates and transmits a picture upload instruction carrying the dish information, receives the target picture received after transmitting the picture upload instruction, and displays the target picture at the target position, so that after detecting the operation gesture, the terminal can directly receive the server to obtain the target picture according to the dish information, and upload the target picture. There is no need for the staff to manually upload the dish picture, which improves the uploading efficiency of the picture, and the success rate of the picture uploading is relatively high, avoiding affecting the sales volume of the dish.
[0097] The embodiment of the present invention provides a method for uploading a dish image, which can determine a target keyword tag according to the dish information to be uploaded, and directly upload a target image corresponding to the target keyword tag to the location indicated by the dish information. Since the target image is obtained by the server itself, it is achieved that there is no need for staff to manually upload the dish image, thereby improving the uploading efficiency of the image, and the success rate of the image uploading is high, so as to avoid affecting the sales volume of the dish. Figure 1B As shown, the method includes:
[0098] 105. When a picture upload instruction is received, obtain the dish information of the dish to be uploaded carried by the picture upload instruction, where the dish information at least includes a dish identifier and a dish name.
[0099] In an embodiment of the present invention, when receiving a picture upload instruction, in order to enable the server to determine which dish the user requests to be matched with a picture, the picture upload instruction will carry the dish information, so that the server can extract the dish information of the dish to be uploaded carried in the picture upload instruction, and subsequently determine the target picture for the dish to be uploaded based on the dish information. The dish information includes at least a dish identifier and a dish name, and the dish identifier can be a dish number, which is used to indicate the location of the dish to be uploaded in the client, so that the determined target picture can be subsequently uploaded to the target location according to the instruction of the dish identifier.
[0100] 106. Obtain at least one keyword tag, and determine a target keyword tag corresponding to the dish name in the at least one keyword tag, wherein a target similarity between the target keyword tag and the dish name satisfies a requirement of a similarity threshold.
[0101] In an embodiment of the present invention, at least one keyword tag can be set in the server, and each keyword tag corresponds to an alternative dish image. In this way, by calculating the similarity between the dish name and the keyword tag, a target keyword tag whose similarity meets the similarity threshold requirement is determined in at least one keyword tag, so that the dish image corresponding to the target keyword can be uploaded as the target image subsequently.
[0102] 107. Extract a target image corresponding to the target keyword tag, and upload the target image to a target location indicated by the dish identifier.
[0103] In an embodiment of the present invention, after the target keyword tag is determined, the target image corresponding to the target keyword tag can be extracted, and the target image can be uploaded to the target location indicated by the dish identifier to achieve image configuration for the dish to be uploaded.
[0104] The method provided by the embodiment of the present invention, when receiving a picture upload instruction, obtains the dish information of the dish to be uploaded carried by the picture upload instruction, determines the target keyword tag corresponding to the dish name in at least one keyword tag, and extracts the target picture corresponding to the target keyword tag, and uploads the target picture to the target location indicated by the dish identifier, so that the server can obtain the target picture by itself according to the dish information and upload the target picture, without the need for staff to manually upload the picture of the dish, thereby improving the uploading efficiency of the picture, and the success rate of picture uploading is relatively high, avoiding affecting the sales volume of the dish.
[0105] The embodiment of the present invention provides a method for uploading a dish image, which can generate and transmit a picture upload instruction carrying dish information when an operation gesture is consistent with a preset gesture, receive a target picture received after transmitting the picture upload instruction, and display the target picture at a target position, so that after detecting the operation gesture, the terminal can directly receive the target picture obtained by the server according to the dish information, and upload the target picture, without the need for staff to manually upload the dish picture, thereby improving the uploading efficiency of the picture, and the success rate of the picture upload is high, so as to avoid affecting the sales volume of the dish, such as Figure 2A As shown, the method includes:
[0106] 201. When the terminal detects that the user requests to display dishes to be uploaded, a request for displaying dishes to be uploaded is generated, and the request for displaying dishes to be uploaded is transmitted to the server.
[0107] In the embodiment of the present invention, the inventors realize that when users who are merchants upload dishes provided by their own stores to the server, they usually upload the dish name, dish price and dish picture of the dish. The dish name and dish price are usually in text and digital form, while the dish picture is in picture form. Generally speaking, in order to avoid the dish picture of each dish being too blurry or occupying too much storage space, the server has certain requirements for the resolution, picture size and other data of the dish picture. Only when the dish picture uploaded by the user to the server meets the requirements of the server can it be uploaded successfully. If the dish picture uploaded by the user to the server does not meet the requirements of the server, then this dish will be regarded as a dish to be uploaded that failed to upload the dish picture, and the user needs to re-upload the dish picture that meets the requirements of the server before it can be sold normally.
[0108] In order to enable the user to query which dish's dish picture has not passed the server's verification, the server can provide services to the user in the form of a client, and the user downloads the client in his own private terminal and enjoys the services provided by the client. Among them, a dish display entrance can be provided in the client, and when it is detected that the user triggers the dish display entrance, it is determined that the user requests to display the dishes to be uploaded. Since a large number of stores will be connected to the server, the dish pictures that have not passed the server verification are different. Therefore, in order for the server to determine which store's dishes to be uploaded that the user requests to display, when the terminal generates a request for displaying dishes to be uploaded, it is necessary to carry a store identification in the request for displaying dishes to be uploaded, so that when the server receives the request for displaying dishes to be uploaded, it can determine which dishes to be uploaded will be displayed according to the store identification carried in the request for displaying dishes to be uploaded. Specifically, the store identification can be store information such as store name, store number, store account, etc., and the embodiment of the present invention does not specifically limit the content included in the store identification. After the terminal generates a request for displaying dishes to be uploaded, the request for displaying dishes to be uploaded can be transmitted to the server.
[0109] 202. When the server receives a request for displaying dishes to be uploaded, it extracts information from the request for displaying dishes to be uploaded, obtains a store ID from the request for displaying dishes to be uploaded, performs data query based on the store ID, and obtains multiple dish data corresponding to the store ID.
[0110] In an embodiment of the present invention, a large amount of dish data of dishes provided by a large number of stores is stored in the server. In order to uniformly manage and plan these dish data and avoid data loss, an underlying database can be set in the server, and a dish library can be set in the underlying database. The dish data of each store is stored based on the dish library. Specifically, the dish data can include dish identification, dish name and dish picture. Among them, when the dish data of each store is stored in the dish library based on the underlying database, in order to distinguish the dish data of each store, the dish data of each store can be stored corresponding to the store identification of the store, or the dish data can be marked with the store identification to distinguish the dish data. In addition, each store may provide more than one dish, so that the dish data corresponding to each store may also be one or more. The embodiment of the present invention does not specifically limit the number of dish data corresponding to each store and the content included in the dish data. It should be noted that considering that the dish pictures uploaded to the server by some users do not meet the requirements of the server, the dish data stored in the server may not include dish pictures, or the value of the dish pictures is null.
[0111] The request for displaying dishes to be uploaded transmitted by the terminal to the server carries a store identification. Therefore, when the server receives the request for displaying dishes to be uploaded, it first extracts information from the request for displaying dishes to be uploaded and obtains the store identification in the request for displaying dishes to be uploaded; then, based on the store identification, it performs data query in the dish library of the underlying database to obtain multiple dish data corresponding to the store identification or multiple dish data marked with the store identification, so as to subsequently determine the dishes to be uploaded among the multiple dish data.
[0112] 203. The server detects multiple dish data, extracts target dish data whose dish pictures are empty from the multiple dish data, obtains the dish ID and dish name of the target dish data, uses the dish ID and dish name of the target dish data as dish information of the dish to be uploaded, and returns the dish information of the dish to be uploaded to the terminal.
[0113] In an embodiment of the present invention, after obtaining multiple dish data corresponding to or marked by the store logo, since the multiple dish data are the dish data of all dishes in the store indicated by the store logo, including dishes whose pictures have been uploaded and dishes whose pictures have not been uploaded, and the user requests to display the dish information of the dishes to be uploaded, that is, the dishes whose pictures have not been uploaded, therefore, the server needs to extract the dish information of the dishes to be uploaded from the multiple dish data, and return the extracted dish information of the dishes to be uploaded to the terminal, so that the terminal can display the dish information of the dishes to be uploaded to the user.
[0114] Among them, when the server extracts the dish information of the dish to be uploaded from multiple dish data, since the dish to be uploaded is the dish whose dish image upload fails, the dish image in the multiple dish data does not exist, that is, the dish data with a null value for the dish image is the dish information of the dish to be uploaded that the server needs to obtain. Specifically, first, the server detects multiple dish data to detect whether the dish images of the multiple dish data are null values; then, the dish data with a null value for the dish image is extracted from the multiple dish data as the target dish data; finally, since the target dish data does not include dish data, the dish ID and dish name of the target dish data are obtained, and the dish ID and dish name of the target dish data are used as the dish information of the dish to be uploaded, and the obtained dish information of the dish to be uploaded is returned to the terminal, so that the terminal can display the dish information of the dish to be uploaded to the user.
[0115] 204. The terminal receives the returned dish information of the dish to be uploaded, determines a preset display method, and displays the dish information of the dish to be uploaded according to the preset display method.
[0116] In an embodiment of the present invention, after the terminal receives the dish information of the dish to be uploaded returned by the server, the dish information of the dish to be uploaded can be displayed to the user. When the terminal displays the dish information of the dish to be uploaded, it needs to rely on the client display of the server, and the client usually has a preset display method when displaying the dish information. Therefore, the terminal determines the preset display method and displays the dish information of the dish to be uploaded according to the preset display method.
[0117] The above process is executed when a user requests to view the dish information of a dish to be uploaded. In the actual application process, the purpose of the user viewing the dish information of the dish to be uploaded is usually to complete the dish image of the dish to be uploaded so that the dish to be uploaded can be sold normally after the dish image is successfully uploaded. In this way, when uploading the dish image for the dish to be uploaded, refer to Figure 2B , the method comprising:
[0118] 205. When it is detected that the display page of dishes to be uploaded is triggered, obtain the operation gesture for triggering the display page of dishes to be uploaded.
[0119] In an embodiment of the present invention, since the terminal will display the dish information of the dishes to be uploaded returned by the server to the user, the terminal can detect whether the user requests to upload the dish picture of the dish based on the displayed dish information of the dishes to be uploaded. The inventors recognize that, generally speaking, when users upload dish pictures for dishes to be uploaded, they need to shoot or search for dish pictures by themselves, and upload the dish pictures to the server. However, the dish pictures shot or searched by the user are likely to not meet the requirements of the server. At this time, the user needs to shoot or search for many times, and upload the dish pictures many times, wasting a lot of manpower and material resources. Therefore, in an embodiment of the present invention, the terminal can detect the user's behavior based on the client of the server. When it is detected that the purpose of the user's operation gesture is to request to upload a picture, a picture upload instruction is generated, and the picture upload instruction is transmitted to the server. The server matches the corresponding dish pictures for the dishes to be uploaded in the future, completes the uploading of the dish pictures, and ensures that the user's one-time picture upload request can be successfully implemented as a dish picture. In the actual application process, the number of dishes that the user requests the server to match pictures can be one or more.
[0120] In actual application, users rely on gestures to operate the terminal and execute various commands through gestures. Therefore, the user's request for operation can be received by identifying the user's operation gestures. Among them, when it is detected that the display page of the dishes to be uploaded is triggered, the operation gesture that triggers the display page of the dishes to be uploaded can be obtained, so that the corresponding instructions can be executed after the operation gesture is subsequently identified.
[0121] 206. The terminal determines a preset gesture, compares the operation gesture with the preset gesture, and if the operation gesture is inconsistent with the preset gesture, executes the following step 207; if the operation gesture is consistent with the preset gesture, executes the following steps 208 to 213.
[0122] In an embodiment of the present invention, after obtaining an operation gesture, in order to identify the operation gesture, a preset gesture may be set, and the operation gesture may be compared with the preset gesture to achieve recognition of the operation gesture. Among them, the preset gesture is at least one or more of a pull-down gesture, a shake gesture, and a sliding gesture. Since the direction of movement of each gesture is different, the operation gesture may be recognized by identifying the moving direction of the operation gesture. Specifically, first, the operation gesture is recognized to determine the moving direction of the operation gesture; then, the preset direction of the preset gesture is obtained, and the moving direction is compared with the preset direction to determine whether the operation gesture is consistent with the preset gesture. It should be noted that since multiple preset gestures may be set in the terminal, when the operation gesture is recognized based on multiple preset gestures, the operation gesture may be compared with each of the multiple preset gestures respectively. Only when there is one preset gesture consistent with the operation gesture, it can be determined that the operation gesture is consistent with the preset gesture. It should be noted that the embodiment of the present invention determines whether to generate a picture upload instruction by detecting whether the operation gesture is consistent with the preset gesture, that is, multiple preset gestures are set in the terminal, and when it is detected that the gesture operation performed by the user in the client is consistent with the preset gesture, it is determined that the user's request to upload the picture is detected. For example, the preset gesture set in the client can be "pull down once", "gravity sensing: shake" or "swipe left and right", etc., so that when the gesture operation performed by the user in the client conforms to the preset gesture, it is determined that the user's request to upload the picture is detected. In the actual application process, a picture upload button can also be set in the terminal, and when it is detected that the user triggers the picture upload button in the terminal, it is determined that the user's request to upload the picture is detected, without comparing the user's operation gesture with the preset gesture. For example, the picture upload button set in the client can be "one-key picture matching", so that when the user triggers the "one-key picture matching" button in the client, it is determined that the user's request to upload the picture is detected. The embodiment of the present invention does not specifically limit the method of determining the user's request to upload the picture.
[0123] By comparing the operation gesture with the preset gesture, it is possible to determine whether the operation gesture is consistent with the preset gesture. Further, if the operation gesture is inconsistent with the preset gesture, it means that the user may not want to upload the dish picture to be uploaded, or the user requests to perform other operations. At this time, the working state can be maintained, or it is determined that other instructions are received, that is, the following step 207 is executed. If the operation gesture is consistent with the preset gesture, it is determined that the user requests to upload the dish picture for the dish to be uploaded. At this time, it is necessary to request the server to upload the dish picture, that is, the following steps 208 to 213 are executed.
[0124] 207. If the operation gesture is inconsistent with the preset gesture, the current working state is maintained and the display page of the dishes to be uploaded continues to be displayed.
[0125] In an embodiment of the present invention, if the operation gesture is inconsistent with the preset gesture, it means that the user currently has no request to upload a picture for the dish to be uploaded. The terminal can maintain the current working state, continue to display the display page of the dish to be uploaded, or execute the instruction corresponding to the user's current behavior.
[0126] 208. If the operation gesture is consistent with the preset gesture, the dish information of the dish to be uploaded is obtained, the dish information is sorted, a picture upload instruction carrying the dish information is generated, and the picture upload instruction is transmitted to the server.
[0127] In an embodiment of the present invention, if the operation gesture is consistent with the preset gesture, it is necessary to generate a picture upload instruction carrying the dish information, and transmit the picture upload instruction to the server so that the server can match the picture with the dish information.
[0128] In order to enable the server to determine which dishes the user requests to be matched with pictures, so that the server can extract the corresponding dish pictures for the dishes, when the terminal detects that the user requests to upload pictures, since the server has transmitted the dish information of the dishes to be uploaded to the terminal for display, when the terminal generates a picture upload instruction, the dish information of the dishes to be uploaded is carried in the picture upload instruction, and the picture upload instruction is transmitted to the server, so that the server determines and uploads the corresponding pictures for the terminal according to the dish information carried in the picture upload instruction. It should be noted that considering that the user may not need the server to upload pictures for all the dishes to be uploaded, the client can also provide a dish selection service, that is, provide a check box for the displayed dishes to be uploaded, and when the user checks the dishes to be uploaded in the check box, the dish information of the dishes to be uploaded is carried in the picture upload request; if the user does not check the dishes to be uploaded in the check box, when the picture upload request is generated, the dish information of the dishes to be uploaded is not carried in the picture upload request. Among them, a check box can be displayed in front of or after the name of the dish to be uploaded. The embodiment of the present invention does not specifically limit how the user selects the dish to be uploaded for requesting the server to provide pictures and the number of dishes to be uploaded for which the user requests the server to provide pictures.
[0129] 209. When the server receives the picture upload instruction, it obtains the dish information of the dish to be uploaded carried by the picture upload instruction.
[0130] In an embodiment of the present invention, since the picture upload instruction sent by the terminal to the server carries the dish information of the dish to be uploaded, when the server receives the picture upload instruction, it can extract information from the picture upload instruction to obtain the dish information of the dish to be uploaded carried by the picture upload instruction, so as to subsequently extract the picture according to the dish information.
[0131] 210. The server extracts keywords from the dish name, obtains the name keywords of the dish name, calculates the similarity between at least one keyword tag and the name keywords, and obtains at least one character similarity.
[0132] In the embodiment of the present invention, in order to achieve picture matching for the dishes to be uploaded, a picture library can be set up in the underlying database of the server, and some alternative dish pictures can be stored based on the picture library, so as to select a matching picture for the dishes to be uploaded from the alternative dish pictures for picture matching. Since a large number of alternative dish pictures will be stored in the picture library to meet the basic requirements for pictures, if the matching picture is determined by identifying the alternative dish pictures every time a picture is determined for the dishes to be uploaded, the workload will be extremely huge, which will overload the server. Therefore, in order to simplify the process of determining pictures for the dishes to be uploaded, for each alternative dish picture in the picture library of the underlying database, a keyword tag corresponding to it can be set according to the dish name of the dish included in the alternative dish picture, and the matching dish picture can be determined for each dish to be uploaded through the keyword tag subsequently.
[0133] Among them, when setting the keyword tag for the alternative dish picture, the dish name of the dish included in the alternative dish picture can be directly used as the keyword tag, and the alternative dish picture can be stored corresponding to the keyword tag, or the alternative dish picture can be labeled with the keyword tag. For example, if the dish name of the dish included in the alternative dish picture is "Fried rice noodles", the keyword tag set for the alternative dish picture can be "Fried rice noodles"; if the dish name of the dish included in the alternative dish picture is "Hairy crabs", the keyword tag set for the alternative dish picture can be "Hairy crabs". It should be noted that the names of some dishes included in the alternative dish pictures may be relatively long, such as "Private house fried pork slices", and the characters "Fried pork slices" can already completely describe the dishes included in the alternative dish pictures. Therefore, when setting the keyword tag for the alternative dish picture, keywords can also be extracted from the dish name and used as the keyword tag, that is, "Fried pork slices" is used as the keyword tag. The embodiment of the present invention does not specifically limit the method of extracting keyword tags.
[0134] Since the underlying database of the server stores a large number of alternative dish images and corresponding keyword tags based on the image database, when the server determines the dish image for the dish to be uploaded, it can obtain the name keyword of the dish name to be uploaded, and calculate the similarity between at least one keyword tag and the name keyword to obtain at least one character similarity, so as to subsequently determine the dish image for the dish to be uploaded based on at least one character similarity. Among them, the process of obtaining the name keyword is consistent with the above-mentioned process of obtaining the keyword of the alternative dish image, and will not be repeated here. Specifically, when calculating the similarity between at least one keyword tag and the name keyword, it can be achieved by executing the following steps one and two.
[0135] Step 1: For any keyword tag in at least one keyword tag, count the target number of characters that overlap between the keyword tag and the name keyword.
[0136] For any keyword tag in at least one keyword tag, once the name keyword is determined, the target number of overlapping characters between the keyword tag and the name keyword can be counted, so as to subsequently calculate the similarity between the keyword tag and the name keyword based on the target number of overlapping characters.
[0137] For example, if the name keyword is "fried rice noodles" and the keyword tag is "fried rice noodles", the target number of characters overlapping between the name keyword and the keyword tag is determined to be 3; if the name keyword is "fried rice noodles" and the keyword tag is "fried rice", the target number of characters overlapping between the name keyword and the keyword tag is determined to be 1; if the name keyword is "fried rice noodles" and the keyword tag is "hairy crab", the target number of characters overlapping between the name keyword and the keyword tag is determined to be 0.
[0138] Step 2: Count the total number of characters in the name keyword, calculate the ratio of the target number of characters to the total number of characters, and use the ratio as the character similarity between the keyword tag and the name keyword.
[0139] By executing the process in step 1 above, the target number of characters of the overlapping characters between the keyword tag and the name keyword can be determined. In this way, the total number of characters of the name keyword is continued to be counted, and the ratio of the target number of characters to the total number is calculated, and the number ratio can be used as the character similarity between the keyword tag and the name keyword. For example, suppose the name keyword is "fried rice noodles", the keyword tag is "fried rice", and the target number of characters of the overlapping characters between the name keyword and the keyword tag is determined to be 1, then the total number of characters of the name keyword is counted to be 3, and the calculated number ratio is 1 / 3, so 1 / 3 can be used as the character similarity between the keyword "fried rice noodles" and the keyword tag "fried rice" is 1 / 3.
[0140] By repeatedly executing the process of calculating the character similarity between the keyword tag and the name keyword described in steps 1 to 2 above, at least one character similarity between the name keyword and at least one keyword tag can be calculated, and then the keyword tag that is most similar to the name keyword can be determined based on the at least one character similarity.
[0141] 211. The server compares at least one character similarity with a similarity threshold, extracts a target similarity greater than the similarity threshold from the at least one character similarity, and extracts a keyword tag indicated by the target similarity from the at least one keyword tag as a target keyword tag.
[0142] In an embodiment of the present invention, after at least one character similarity is generated, in order to determine a keyword tag that is most similar to the name keyword in at least one keyword tag according to the character similarity, a similarity threshold for screening the character similarity can be set in the server, and the similarity threshold is compared with at least one character similarity, and the character similarity greater than the similarity threshold is extracted from at least one character similarity as the target similarity, and then the keyword tag indicated by the target similarity is extracted from at least one keyword tag as the target keyword tag. For example, if the similarity threshold is set to 90%, and the character similarities obtained are 33.3%, 25%, 50% and 100% respectively, then the 100% character similarity can be used as the target similarity.
[0143] In the actual application process, in order to simplify the process of determining the target similarity, at least one character similarity can also be sorted, and the maximum character similarity can be directly used as the target similarity, thereby omitting the process of comparing at least one character similarity with the similarity threshold. For example, continue to use the obtained character similarities of 33.3%, 25%, 50% and 100% as an example for explanation, and the sorting results obtained after sorting the obtained character similarities from large to small are 100%, 50%, 33.3% and 25%. In this way, the 100% character similarity can be directly used as the target similarity. The embodiment of the present invention does not specifically limit the method for determining the target similarity. After determining the target similarity, the keyword tag indicated by the target similarity can be used as the target keyword tag, so that the dish pictures that need to be uploaded can be determined later according to the target keyword tag.
[0144] 212. The server obtains the image address corresponding to the target keyword tag, extracts the target image at the image address, determines the target location indicated by the dish identifier, and transmits the target image to the target location.
[0145] In the embodiment of the present invention, after the server determines the target keyword tag, the target image can be obtained according to the target keyword tag to upload the target image. In order to save storage space in the underlying database of the server, the image library of the underlying database may only store the image address of the image, and does not store the real image. Therefore, the server can obtain the image address corresponding to the target keyword tag and extract the target image from the image address. In the actual application process, if the image is directly stored in the image library of the underlying database, the target image can also be directly extracted from the image library of the underlying database.
[0146] After obtaining the target image, since the user may request multiple dishes to be uploaded for illustration, in order to ensure that the location where the target image is uploaded is correct, the server determines the target location indicated by the dish identifier and transmits the target image to the target location, thereby realizing the upload of the target image.
[0147] 213. The terminal receives the target image uploaded by the server to the target location indicated by the dish identifier, and displays the target image at the target location.
[0148] In an embodiment of the present invention, since the terminal is based on the pictures of dishes displayed by the client, the position of each dish in the client is different. Therefore, the terminal receives the target picture uploaded by the server to the target position indicated by the dish identifier, and displays the target picture at the target position, thereby realizing the uploading of the dish picture to be uploaded.
[0149] Through the above process, it is possible to match all the images of the dishes that need to be uploaded at one time, and through batch interactive operations, the time for matching images can be shortened to about 5 seconds. It should be noted that after the target image is successfully displayed at the target position, if the terminal detects that the user requests to upload the image again, it means that the user may not be satisfied with the currently displayed target image, then the terminal sends the image upload instruction to the server again, and the server re-executes the process shown in steps 206 to 209 above, and re-determines a new batch of target images that are different from the previous target images for the dishes to be uploaded, and uploads them, and displays them to the user based on the terminal, so as to provide the user with more choices.
[0150] The method provided by the embodiment of the present invention, when receiving a picture upload instruction, obtains the dish information of the dish to be uploaded carried by the picture upload instruction, determines the target keyword tag corresponding to the dish name in at least one keyword tag, and extracts the target picture corresponding to the target keyword tag, and uploads the target picture to the target location indicated by the dish identifier, so that the server can obtain the target picture by itself according to the dish information and upload the target picture, without the need for staff to manually upload the picture of the dish, thereby improving the uploading efficiency of the picture, and the success rate of picture uploading is relatively high, avoiding affecting the sales volume of the dish.
[0151] Further, as Figure 1A In a specific implementation of the method, the present invention provides a device for uploading a dish image, such as Figure 3A As shown, the device includes: an acquisition module 301, a comparison module 302, a generation module 303 and a display module 304.
[0152] The acquisition module 301 is used to acquire the operation gesture that triggers the display page of the dish to be uploaded when it is detected that the display page of the dish to be uploaded is triggered, and the display page of the dish to be uploaded displays the dish information of at least one dish to be uploaded, and the dish information at least includes a dish identifier and a dish name;
[0153] The comparison module 302 is used to determine a preset gesture and compare the operation gesture with the preset gesture, wherein the preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture;
[0154] The generating module 303 is used to generate a picture uploading instruction carrying the dish information if the operation gesture is consistent with the preset gesture, and transmit the picture uploading instruction;
[0155] The display module 304 is used to receive a target image uploaded to a target location indicated by the dish identifier, and display the target image at the target location. The target image is determined and extracted according to the dish name.
[0156] In specific application scenarios, such as Figure 3B As shown, the device includes a transmission module 305 and a receiving module 306 .
[0157] The transmission module 305 is used to generate a request for displaying the dishes to be uploaded when detecting that the user requests to display the dishes to be uploaded, and transmit the request for displaying the dishes to be uploaded, wherein the request for displaying the dishes to be uploaded carries a store identifier;
[0158] The receiving module 306 is used to receive the returned dish information of the dish to be uploaded, determine a preset display method, and generate a display page of the dish to be uploaded including the dish information according to the preset display method.
[0159] In specific application scenarios, such as Figure 3C As shown, the comparison module 302 includes an identification unit 3021 and a comparison unit 3022 .
[0160] The recognition unit 3021 is used to recognize the operation gesture and determine the moving direction of the operation gesture;
[0161] The comparing unit 3022 is used to obtain a preset direction of the preset gesture and compare the moving direction with the preset direction.
[0162] The device provided by the embodiment of the present invention, when detecting that the display page of the dish to be uploaded is triggered, obtains the operation gesture that triggers the display page of the dish to be uploaded, and when the operation gesture is consistent with the preset gesture, generates and transmits a picture upload instruction carrying the dish information, receives the target picture received after transmitting the picture upload instruction, and displays the target picture at the target position, so that after detecting the operation gesture, the terminal can directly receive the server to obtain the target picture according to the dish information, and upload the target picture. There is no need for the staff to manually upload the dish picture, which improves the uploading efficiency of the picture, and the success rate of the picture upload is relatively high, avoiding affecting the sales volume of the dish.
[0163] Further, as Figure 1B In a specific implementation of the method, the present invention provides a device for uploading a dish image, such as Figure 4A As shown, the device includes: an acquisition module 401, a determination module 402 and an upload module 403.
[0164] The acquisition module 401 is used to, when receiving a picture upload instruction, acquire the dish information of the dish to be uploaded carried in the picture upload instruction, wherein the dish information at least includes a dish identifier and a dish name;
[0165] The determination module 402 is used to obtain at least one keyword tag, determine a target keyword tag corresponding to the dish name from the at least one keyword tag, and the target similarity between the target keyword tag and the dish name meets the requirement of a similarity threshold;
[0166] The uploading module 403 is used to extract the target image corresponding to the target keyword tag and upload the target image to the target location indicated by the dish identifier.
[0167] In specific application scenarios, such as Figure 4B As shown, the device also includes an extraction module 404 , a query module 405 , a detection module 406 and a return module 407 .
[0168] The extraction module 404 is used to extract information from the dish display request to be uploaded when receiving the dish display request to be uploaded, and obtain the store identification from the dish display request to be uploaded;
[0169] The query module 405 is used to perform data query based on the store identifier to obtain multiple dish data corresponding to the store identifier, wherein the dish data at least includes a dish identifier, a dish name, and a dish picture;
[0170] The detection module 406 is used to detect the multiple dish data and extract the target dish data whose dish image is a null value from the multiple dish data;
[0171] The return module 407 is used to obtain the dish identifier and dish name of the target dish data, use the dish identifier and dish name of the target dish data as the dish information of the dish to be uploaded, and return the dish information of the dish to be uploaded.
[0172] In specific application scenarios, such as Figure 4C As shown, the determination module 402 includes an extraction unit 4021 , a calculation unit 4022 , a comparison unit 4023 and a determination unit 4024 .
[0173] The extraction unit 4021 is used to extract keywords from the dish name to obtain the name keywords of the dish name;
[0174] The calculation unit 4022 is used to calculate the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity;
[0175] The comparing unit 4023 is used to compare the at least one character similarity with the similarity threshold, and extract a target similarity greater than the similarity threshold from the at least one character similarity;
[0176] The determining unit 4024 is configured to extract the keyword tag indicated by the target similarity from at least one keyword tag as the target keyword tag.
[0177] In a specific application scenario, the calculation unit 4022 is used to count the target number of overlapping characters between the keyword tag and the name keyword for any one of the at least one keyword tag; count the total number of characters of the name keyword, calculate the ratio of the target number of characters to the total number, and use the ratio as the character similarity between the keyword tag and the name keyword; repeat the above process of calculating the character similarity between the keyword tag and the name keyword to obtain the at least one character similarity.
[0178] In specific application scenarios, such as Figure 4D As shown, the uploading module 403 includes an extracting unit 4031 and a transmitting unit 4032 .
[0179] The extraction unit 4031 is used to obtain the image address corresponding to the target keyword tag, and extract the target image at the image address;
[0180] The transmission unit 4032 is used to determine the target location indicated by the dish logo and transmit the target image to the target location.
[0181] The device provided by the embodiment of the present invention can, when receiving a picture upload instruction, obtain the dish information of the dish to be uploaded carried by the picture upload instruction, determine the target keyword tag corresponding to the dish name in at least one keyword tag, and extract the target picture corresponding to the target keyword tag, and upload the target picture to the target location indicated by the dish identifier, so that the server can obtain the target picture by itself according to the dish information and upload the target picture. There is no need for staff to manually upload pictures of dishes, which improves the uploading efficiency of pictures, and the success rate of picture uploading is relatively high, avoiding affecting the sales volume of dishes.
[0182] In an exemplary embodiment, see Figure 5 , a device is also provided, the device 500 includes a communication bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the dish picture uploading method in the above embodiment.
[0183] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for uploading a dish image.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0185] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for the implementation of the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenarios can be combined into one module, or can be further split into multiple sub-modules. The above-mentioned serial numbers of this application are only for description and do not represent the pros and cons of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any changes that can be thought of by a technician in this field should fall within the scope of protection of the present application.
Claims
1. A method for uploading a dish picture. It is characterized in that The method comprises: When it is detected that the operation gesture triggering the display page of the dish to be uploaded is consistent with the preset gesture, obtaining the dish information displayed on the display page of the dish to be uploaded, wherein the dish information at least includes the name of the dish; Acquire at least one keyword tag, and determine a target keyword tag corresponding to the dish name from the at least one keyword tag, wherein a target similarity between the target keyword tag and the dish name satisfies a similarity threshold requirement; Extract the target image corresponding to the target keyword tag, and upload the target image to the target location corresponding to the dish information for display, wherein the target image is a picture selected by the server for the dish to be uploaded from the alternative dish pictures based on the dish information.
2. The method according to claim 1, It is characterized in that When it is detected that the operation gesture for triggering the display page of the dish to be uploaded is consistent with the preset gesture, before obtaining the dish information displayed on the display page of the dish to be uploaded, the method further includes: When it is detected that the user requests to display the dishes to be uploaded, extract the store logo; Performing data query based on the store identification to obtain a plurality of dish data corresponding to the store identification, wherein the dish data at least includes a dish identification, a dish name, and a dish picture; Detecting the plurality of dish data, and extracting target dish data whose dish picture is a null value from the plurality of dish data; Acquire the dish identifier and dish name of the target dish data, and use the dish identifier and dish name of the target dish data as the dish information of the dish to be uploaded; Determine a preset display method, and generate the dish display page to be uploaded including the dish information according to the preset display method.
3. The method according to claim 1, It is characterized in that When it is detected that the operation gesture for triggering the display page of the dish to be uploaded is consistent with the preset gesture, before obtaining the dish information displayed on the display page of the dish to be uploaded, the method further includes: Acquire an operation gesture that triggers the display page of the dish to be uploaded, identify the operation gesture, and determine a moving direction of the operation gesture; A preset direction of the preset gesture is obtained, and the moving direction is compared with the preset direction, wherein the preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture.
4. The method according to claim 1, It is characterized in that The acquiring at least one keyword tag and determining a target keyword tag corresponding to the dish name in the at least one keyword tag includes: Perform keyword extraction on the dish name to obtain the name keyword of the dish name; Calculating the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity; Comparing the at least one character similarity with the similarity threshold, and extracting a target similarity greater than the similarity threshold from the at least one character similarity; A keyword tag indicated by the target similarity is extracted from at least one keyword tag as the target keyword tag.
5. The method according to claim 4, It is characterized in that The calculating the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity includes: For any keyword tag among the at least one keyword tag, counting the number of target characters that overlap between the keyword tag and the name keyword; Counting the total number of characters of the name keyword, calculating the ratio of the target number of characters to the total number of characters, and using the ratio as the character similarity between the keyword tag and the name keyword; The above process of calculating the character similarity between the keyword tag and the name keyword is repeated to obtain the at least one character similarity.
6. The method according to claim 1, It is characterized in that The extracting a target image corresponding to the target keyword tag and uploading the target image to a target location corresponding to the dish information for display includes: Obtain the image address corresponding to the target keyword tag, and extract the target image from the image address; Determine the target location indicated by the dish identification included in the dish information, and transmit the target image to the target location for display.
7. A device for uploading pictures of dishes, It is characterized in that The device comprises: An acquisition module, configured to acquire dish information displayed on the dish display page to be uploaded when detecting that the operation gesture triggering the dish display page to be uploaded is consistent with a preset gesture, wherein the dish information at least includes a dish name; A determination module, configured to obtain at least one keyword tag, and determine a target keyword tag corresponding to the dish name from the at least one keyword tag, wherein a target similarity between the target keyword tag and the dish name satisfies a similarity threshold requirement; An upload module is used to extract a target image corresponding to the target keyword tag, and upload the target image to a target location corresponding to the dish information for display, wherein the target image is a picture selected by the server for the dish to be uploaded from among the alternative dish pictures based on the dish information.
8. The device according to claim 7, It is characterized in that The device also includes: An extraction module, configured to extract a store logo when detecting that a user requests to display the dishes to be uploaded; A query module, used to perform data query based on the store identifier, and obtain a plurality of dish data corresponding to the store identifier, wherein the dish data at least includes a dish identifier, a dish name, and a dish picture; A detection module, used to detect the plurality of dish data, and extract target dish data whose dish image is a null value from the plurality of dish data; A return module, used to obtain the dish identifier and dish name of the target dish data, and use the dish identifier and dish name of the target dish data as the dish information of the dish to be uploaded; The receiving module is used to determine a preset display method and generate the dish display page to be uploaded including the dish information according to the preset display method.
9. The device according to claim 7, It is characterized in that The device also includes: A comparison module, used to obtain the operation gesture that triggers the display page of the dish to be uploaded, identify the operation gesture, and determine the moving direction of the operation gesture; The comparison module is further used to obtain a preset direction of the preset gesture and compare the moving direction with the preset direction. The preset gesture is at least a pull-down gesture, a shake gesture, and a slide gesture.
10. The device according to claim 7, It is characterized in that The determining module comprises: An extraction unit, used to extract keywords from the dish name to obtain the name keywords of the dish name; a calculation unit, configured to calculate the similarity between the at least one keyword tag and the name keyword to obtain at least one character similarity; A comparing unit, configured to compare the at least one character similarity with the similarity threshold, and extract a target similarity greater than the similarity threshold from the at least one character similarity; The determining unit is configured to extract the keyword tag indicated by the target similarity from at least one keyword tag as the target keyword tag.
11. The device according to claim 10, It is characterized in that The calculation unit is used to count the target number of characters that overlap between any one of the at least one keyword tag and the name keyword; Count the total number of characters in the name keyword, calculate the ratio of the target number of characters to the total number, and use the ratio as the character similarity between the keyword tag and the name keyword; repeat the above process of calculating the character similarity between the keyword tag and the name keyword to obtain the at least one character similarity.
12. The device according to claim 7, It is characterized in that The upload module comprises: An extraction unit, configured to obtain a picture address corresponding to the target keyword tag, and extract the target picture at the picture address; A transmission unit is used to determine the target location indicated by the dish identification included in the dish information, and transmit the target image to the target location for display.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
14. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
