[go: up one dir, main page]

CN111104630A - Menu file creating method and device, storage medium and electronic device - Google Patents

Menu file creating method and device, storage medium and electronic device Download PDF

Info

Publication number
CN111104630A
CN111104630A CN201911207155.1A CN201911207155A CN111104630A CN 111104630 A CN111104630 A CN 111104630A CN 201911207155 A CN201911207155 A CN 201911207155A CN 111104630 A CN111104630 A CN 111104630A
Authority
CN
China
Prior art keywords
information
menu
data
menu data
channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201911207155.1A
Other languages
Chinese (zh)
Inventor
彭允胄
谭永春
吴甲文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Unicook Technology Co Ltd
Original Assignee
Zhuhai Unicook Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Unicook Technology Co Ltd filed Critical Zhuhai Unicook Technology Co Ltd
Priority to CN201911207155.1A priority Critical patent/CN111104630A/en
Publication of CN111104630A publication Critical patent/CN111104630A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a menu file creating method and device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring first information channel menu data in a natural language format; converting the first information channel menu data to obtain second information channel menu data; and creating a menu file according to the menu data of the second information flow channel. The invention solves the technical problem that the menu file occupies large resources in the related technology, improves the establishment scheme of the menu with the information flow channel, can improve the execution efficiency of menu execution equipment and saves the resource expenditure of the equipment.

Description

Menu file creating method and device, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a menu file creating method and device, a storage medium and an electronic device.
Background
The traditional menu file in the related art, namely the file which clearly explains the cooking process and steps of the menu through text description (or text description + picture description), has the following problems:
the traditional menu file is limited to a description mode of characters and pictures, cannot reflect an interaction process of a cook and cooking equipment, and more importantly cannot express actions of the cook and the equipment from a time dimension, for example, when the cook turns and fries, the equipment state, the current output power and the pot temperature are different, a menu created by lacking of important cooking parameters is uncontrollable in the reduction degree of the menu effect, and the requirement on a restorer is very high.
The description of the cooking process by the conventional recipe file is generally described step by step using words (natural language), such as what is prepared in step 1, what is done in step 2, and the like, such as a recipe on the "lower kitchen" app. The recipe of the type can be freely written by using a natural language, so that the same meaning can be represented differently due to the flexibility of the language, for example, 2 steps and the tomato scrambled eggs with the same operation are completely the same, the steps may be completely different in description but the meanings are the same because the recipe is a text recipe written by different cooks, and the recipe is completely different from the data level, so that the common recipe user is confused, the data processing is difficult, and the template writing and the modular optimization processing of the recipe cannot be realized;
the natural language has the advantages of intuition, close life and good comprehension for people; but are not well understood by the machine and the data requires processing by the machine to effect control of the machine. The recipe file described in the natural language has the following problems when being subjected to data processing: 1. natural language analysis is needed to be carried out on natural language, and effective information is extracted; 2. natural language expresses and describes the same meaning in various ways, and causes difficulty in understanding the machine; 3. the machine can not understand the natural language, and the execution efficiency of the natural language is not high because the steps 1 and 2 are required to be carried out on the natural language; 4. natural language does not allow for the privacy of valuable information. Therefore, the image-text menu file created through the natural language is only suitable for being read by people and is not suitable for being executed by a machine, and the related art does not have a menu file which is suitable for being executed by the machine.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a menu file creating method and device, a storage medium and an electronic device.
According to an embodiment of the present invention, there is provided a method of creating a menu file, including: acquiring first information channel menu data in a natural language format; converting the first information channel menu data to obtain second information channel menu data; and creating a file according to the second information channel menu data.
Optionally, the acquiring the first information channel menu data in the natural language format includes at least one of: acquiring information prompt data of the menu in a natural language format in a first information flow channel; acquiring the feeding operation data of the menu in the natural language format of the second information flow channel; and acquiring the equipment action data of the menu in the third information flow channel in the natural language format.
Optionally, the converting the information channel menu data includes: identifying semantic content in the first information channel menu data; mapping the semantic content to cooking terms based on a preset cooking dictionary.
Optionally, creating a recipe file according to the second information channel recipe data includes: identifying operation information and time sequence information in the second information channel menu data; and creating a menu file according to the time sequence information and the operation information.
Optionally, creating a menu file according to the timing information and the operation information includes: distributing a target cooking information flow channel to which the operation information belongs according to the semantics of the operation information, and determining the dotting time of the operation information on the target cooking information flow channel based on the time sequence information; loading a template file, wherein the template file comprises a longitudinally extending time axis and a plurality of cooking information runners which are arranged transversely; and dotting the operation information at an information flow channel position corresponding to the dotting time on the target cooking information flow channel of the template file.
Optionally, the target cooking information flow path includes one of: a prompt information flow channel, a material information flow channel and an equipment information flow channel.
Optionally, before creating the recipe file according to the second information channel recipe data, the method further includes: performing lexical validity check on the second information flow channel menu data, and/or performing semantic validity check on the second information flow channel menu data; and under the condition that the lexical validity check and/or the semantic validity check pass, determining to create a menu file according to the second information channel menu data.
Optionally, the lexical validity check of the second information channel menu data includes: acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to a sentence pattern sequence; judging whether the syntax tree comprises syntax content of a preset syntax expression or not; when the grammar tree comprises grammar contents of a preset grammar expression, determining that the second information channel menu data passes lexical validity check; and when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity check of the second information channel menu data is not passed.
Optionally, performing semantic validity check on the second information channel menu data includes: acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to a sentence pattern sequence; identifying semantic content of the word element; judging whether the semantic content is matched with the grammatical content of a preset grammatical expression; when the semantic content is matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data passes semantic validity check; and when the semantic content is not matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data does not pass the semantic validity check.
Optionally, after creating the recipe file according to the second information channel recipe data, the method further includes: and responding to a search instruction of the target menu, and executing the menu file on the terminal equipment.
According to another embodiment of the present invention, there is provided a creating apparatus of a menu file, including: the acquisition module is used for acquiring first information channel menu data in a natural language format; the conversion module is used for converting the first information channel menu data to obtain second information channel menu data; and the creating module is used for creating a menu file according to the second information channel menu data.
Optionally, the obtaining module includes at least one of: the first acquisition unit is used for acquiring information prompt data of the menu of the information flow channel in the natural language format of the first information flow channel; the second acquisition unit is used for acquiring the feeding operation data of the menu of the information flow channel in the natural language format of the second information flow channel; and the third acquisition unit is used for acquiring the equipment action data of the menu of the information flow channel in the natural language format of the third information flow channel.
Optionally, the conversion module includes: the identification unit is used for identifying semantic content in the first information channel menu data; a mapping unit for mapping the semantic content into a cooking term based on a preset cooking dictionary.
Optionally, the creating module includes: the identification unit is used for identifying operation information and time sequence information in the second information channel menu data; and the creating unit is used for creating a menu file according to the time sequence information and the operation information.
Optionally, the creating unit includes: the processing subunit is used for distributing a target cooking information flow channel to which the operation information belongs according to the semantic meaning of the operation information and determining the dotting time of the operation information on the target cooking information flow channel based on the time sequence information; the system comprises a loading subunit, a processing unit and a control unit, wherein the loading subunit is used for loading a template file, and the template file comprises a time axis and at least one cooking information flow channel; and the dotting subunit is used for dotting the operation information at an information flow channel position corresponding to the dotting time on the target cooking information flow channel of the template file.
Optionally, the target cooking information flow path includes one of: a prompt information flow channel, a material information flow channel and an equipment information flow channel.
Optionally, the apparatus further comprises: the verification module is used for carrying out lexical validity verification on the second information flow channel menu data and/or carrying out semantic validity verification on the second information flow channel menu data before the creation module creates the menu file according to the second information flow channel menu data; and the determining module is used for determining to create the menu file according to the second information flow channel menu data under the condition that the lexical validity check and/or the semantic validity check pass.
Optionally, the verification module includes: the first obtaining unit is used for obtaining a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements formed according to a sentence pattern sequence; the first judging unit is used for judging whether the grammar tree comprises grammar contents of a preset grammar expression; the first determining unit is used for determining that the second information channel menu data passes lexical validity check when the grammar tree comprises grammar contents of a preset grammar expression; and when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity check of the second information channel menu data is not passed.
Optionally, the verification module includes: a second obtaining unit, configured to obtain a syntax tree of the second information channel menu data, where the syntax tree includes multiple morphemes formed according to a sentence pattern sequence; an identifying unit for identifying semantic content of the word element; the second judgment unit is used for judging whether the semantic content is matched with the grammar content of a preset grammar expression; the second determining unit is used for determining that the second information channel menu data passes semantic validity check when the semantic content is matched with the grammar content of a preset grammar expression; and when the semantic content is not matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data does not pass the semantic validity check.
Optionally, the apparatus further comprises: and the execution module is used for responding to a search instruction of a target menu and executing the menu file on the terminal equipment after the creation module creates the menu file according to the second information flow channel menu data.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the first information channel menu data in the natural language format is acquired, then the first information channel menu data is converted to obtain the second information channel menu data, finally the menu file is created according to the second information channel menu data, and the redundant and complex natural language is converted into the second information channel menu data which is convenient for machine identification and processing, so that the code amount of the menu file is reduced, the technical problem that the menu file in the related technology occupies large resources is solved, the creation scheme of the information channel menu is improved, the execution efficiency of the menu execution equipment can be improved, and the resource overhead of the equipment is saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a recipe file creation method according to an embodiment of the present invention;
FIG. 2 is a schematic interface diagram of an information flow channel recipe according to an embodiment of the invention;
FIG. 3 is a display interface diagram of a template file according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of the menu in the information flow path showing the prompt information in the prompt information flow path;
fig. 5 is a block diagram of a menu file creation apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In this embodiment, a method for creating a menu file is provided, and fig. 1 is a flowchart of a method for creating a menu file according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, acquiring first information channel menu data in a natural language format;
in this embodiment, the first information channel menu data is a natural language text or video acquired from an author or a menu database during creation of an information channel menu, belongs to an original material of the information channel menu, may have a large amount of redundant and repeated information, and occupies a large amount of resources.
Step S104, converting the first information channel menu data to obtain second information channel menu data;
the information flow channel in this embodiment includes a visual interactive interface, which includes an area for carrying cooking information; in this region, cooking information is entered by the associated timing sequence and arranged based on the timing sequence.
In another embodiment of the present invention, the time sequence in the association time sequence may be a relative sequence not based on a specific time point, or a sequence established based on a specific time point. The area can be a bar-shaped area, which can be variable length, for example, according to the length of the electronic menu, or fixed; of course, other shapes are possible, such as annular regions, helical regions, etc.
In another embodiment of the present invention, the interactive interface of the information flow path includes several areas for carrying contents of different types of cooking information; the different areas are distinguished from each other, the specific content of the cooking information can be displayed in the corresponding areas, and the sequence of the cooking information in each area also represents the time sequence of the electronic menu in operation.
In another embodiment of the present invention, the information flow path may further include a time axis, and the time axis represents dynamic change of time and static indication of time. The time information indicated in the cooking information may be derived from or associated with this time axis and accordingly indicate a relative specific point in time. The dynamic change means that a real-time changing time line can be displayed in the process of recording the electronic menu so as to prompt a user of the current time for recording the electronic menu and the position of the electronic menu in each information flow channel (if a plurality of electronic menus are recorded), and the subsequent dotting operation of the user locks specific relative time, namely the dotting time at the static indication position.
The second information channel menu data of this embodiment is data obtained by semantically simplifying and converting the first information channel menu data, and natural language is converted into terms. The present embodiment may perform other types of conversions in addition to semantic conversion, such as extracting key fields in natural language, forming cooking terms, or converting natural language into character codes or patterns that are used to describe events in the cooking process, such as representing cookware with a pattern of a pot, representing cookware with a pattern of a pot
Figure BDA0002297160290000071
Represents a food material, and represents a prompt by a bulb.
And step S106, creating a menu file according to the menu data of the second information channel.
The menu file of this embodiment is a menu file in a machine language format suitable for machine parsing execution, such as a binary file, a code file encoded in assembly language, and the like.
Through the steps, the first information channel menu data in the natural language format is obtained, then the first information channel menu data is converted to obtain the second information channel menu data, finally, a menu file is created according to the second information channel menu data, and the redundant and complex natural language is converted into the second information channel menu data which is convenient for machine identification and processing, so that the code amount of the menu file is reduced, the technical problem that the menu file in the related technology occupies large resources is solved, the creation scheme of the information channel menu is improved, the execution efficiency of menu execution equipment can be improved, and the resource expense of the equipment is saved.
The execution main body of the embodiment may be a computer, a handheld terminal (such as a mobile phone, etc.), a cooking device, an automatic cooker, etc., but is not limited thereto.
The information channel menu data of this embodiment is classified according to the semantics of the menu content, and includes, in addition to the time information: information prompt, feeding operation, equipment action and the like. The information prompt is used for recording prompt information which needs manual assistance to operate the menu; the feeding operation is used for recording the action steps of adding food materials or seasonings into the pot, and comprises the operations of manual feeding and automatic feeding; the device action is used to record the step of adjusting the cooking device. The scheme of this embodiment is not limited to these three information channels, and may also be two or 4, for example, the fourth information channel may be temperature control data. In this embodiment, a cooking information flow channel may be set for each type of recipe data, and the cooking information flow channel is a prompt information flow channel, a material information flow channel, and an equipment information flow channel. The information channels can be displayed at different positions in different modes, such as transverse arrangement and longitudinal arrangement, or personalized arrangement according to the habits of users.
In this embodiment, the first information channel menu data in the natural language format may be, but is not limited to: acquiring information prompt data of the menu in a natural language format in a first information flow channel; acquiring the feeding operation data of the menu in the natural language format of the second information flow channel; and acquiring the equipment action data of the menu in the third information flow channel in the natural language format. Optionally, different information flow channels may be set according to different devices, for example, an information flow channel is set for a heating device (cooker), and an information flow channel is set for a cooking device (pot).
The first information channel menu data may include the content of one information channel, and may also include the content of a plurality of information channels.
In this embodiment, converting the information channel menu data includes: identifying semantic content in the first information channel menu data; the semantic content is mapped to cooking terms based on a preset cooking dictionary.
The scheme of the embodiment uses chef terms in the preset cooking dictionary instead of natural language to write the electronic menu, so that the diversity of cooking behavior description can be avoided, and the description of the same thing can be unified. The chef terms in the preset cooking dictionary refer to a set of dialogs well known and common to chefs in the catering industry, such as: the cooking terms of the embodiment correspond to keys in key-value pairs (key-values) in a database, so that the storage capacity is small, the effect of convenient searching is achieved, but the corresponding meaning (natural language) is value, electronic menu making is carried out in an information flow channel by using the method, the data volume and the redundancy of the data are reduced, the learning cost of a menu creator-cook is reduced, and meanwhile, the menu is simpler and more concise.
In addition, before the semantic content in the first information channel menu data is identified, the first information channel menu data can be filtered, and meaningless characters and characters can be deleted.
When the information flow channel menu is created, a creator (such as a chef) may input a common natural language during creation, and in order to facilitate background processing, the creation equipment can refine and convert the input common natural language into chef terms.
In one example, the cook writes natural language "heat the food material a in water for one minute to fish out" when creating, the creation platform recognizes the action performed in this step and converts it into the cook term "blanching", and when the menu creation interface displays the prompt information to the user, the complicated natural language is not displayed, but the simple term is displayed, such as "food material a blanching for one minute".
In the embodiment, when the menu file is created, the electronic menu is compiled in an information flow channel mode, and menu prompt, chef operation and equipment action can be unified on the same time dimension, so that the relationship among different operation objects can be intuitively seen by reflecting the sequence of interaction.
Fig. 2 is a schematic interface diagram of an information flow channel menu according to an embodiment of the present invention, where the leftmost side is a vertical time axis, and the time when an event occurs is identified, and then the following are performed in sequence: a prompt information flow channel for recording prompt information steps needing manual assistance to operate the menu; a material consumption information flow channel for recording the action steps of adding food materials or seasonings into the pot, including the operation of manual feeding and automatic feeding; a 'pot' information flow channel, recording the step of adjusting the cooking equipment. The menu creator sequentially assigns the steps to the corresponding information flow channels according to the cooking sequence of dishes, and after the electronic menu is compiled, the execution flow of the whole menu can be intuitively previewed, so that the corresponding operation or state of other two information flow channels can be clearly known when the menu executes one step of one information flow channel.
In this embodiment, creating the recipe file according to the second information channel recipe data includes:
s11, identifying operation information and time sequence information in the second information channel menu data;
the operation information of this embodiment is information such as menu prompts, materials, and device actions, and is used to describe the content to be displayed in each information channel, and the time sequence information includes time, sequence, and is used to describe the display time and display sequence of each operation.
And S12, creating a menu file according to the time sequence information and the operation information.
In one embodiment of this embodiment, creating the recipe file according to the timing information and the operation information includes:
s121, distributing a target cooking information flow channel to which the operation information belongs according to the semantics of the operation information, and determining the dotting time of the operation information on the target cooking information flow channel based on the time sequence information.
Optionally, the target cooking information flow path includes one of: a prompt information flow channel, a material information flow channel and an equipment information flow channel;
for example, if the operation information 1 is "prepare food a", the target cooking information flow path to which the operation information 1 belongs is a presentation information flow path, and if the operation information 2 is "put in food B", the target cooking information flow path to which the operation information 1 belongs is a material information flow path, and if the operation information 3 is "small fire", the target cooking information flow path to which the operation information 1 belongs is an equipment information flow path.
The operation information and the time sequence information in the second information flow channel menu data are associated one by one, namely, one operation information corresponds to one time sequence information and corresponds to one target cooking information flow channel. In this embodiment, when determining the dotting time of the operation information on the target cooking information flow channel based on the time sequence information, if the time sequence information is time information, such as 30 th minute, after 5 minutes, etc., the time information is directly used as the dotting time, which corresponds to: 30: 00, historical time +05:00, if the time sequence information is sequence information, such as the first step, then, the last, etc., the sequence information needs to be converted into time, such as setting a step length time (e.g., 10 minutes) for each step, or modifying the time axis of the information channel menu into the sequence axis.
S122, loading a template file, wherein the template file comprises a time axis and at least one cooking information flow channel;
in one example, the template file includes a longitudinally extending time axis and a plurality of cooking information runners arranged laterally;
fig. 3 is a display interface diagram of a template file according to an embodiment of the present invention, which illustrates an interface diagram of a time axis (which may be regarded as a time information flow channel) and a plurality of cooking information flow channels, and of course, the display modes of the time axis and the cooking information flow channels may be other modes, such as a transverse extension of the time axis, a longitudinal arrangement of the cooking information flow channels, and the like;
and S123, dotting operation information at the information flow channel position corresponding to the dotting time on the target cooking information flow channel of the template file.
Fig. 4 is a schematic diagram of the information flow channel menu of the embodiment of the present invention showing the prompt information in the prompt information flow channel, and the dotting time is 00: 00.
in this embodiment, before creating the recipe file according to the second information channel recipe data, the method further includes:
s21, performing lexical validity check on the second information channel menu data, and/or performing semantic validity check on the second information channel menu data;
in some scenes, a certain cooking action in the cooking process of dishes needs to be carried out on the premise of meeting a certain condition, if the six-component oil temperature is used for releasing the fragrance head, the precondition that the fragrance head is put into a pot is that the six-component oil temperature is reached, and if the fragrance head is thickened, the cooker outputs strong fire for cooking for 60 seconds, the cooker outputs strong fire for collecting juice after water starch is added, and the precondition that the cooking for 60 seconds is thickened. In this embodiment, after the first information flow channel menu data is converted into the cooking term, lexical and semantic verification needs to be performed on the second information flow channel menu data, so that in the electronic menu, the cooking behavior can be described as a standard form of "condition and action" by using the second information flow channel menu data meeting the condition.
Because the computer does not recognize the instructions of the conditions and the actions, the electronic menu of the conditions and the actions written by the cooking terms (initial terms) needs to be converted into a language which can be understood by the computer, the cooking statement expressions of the conditions and the actions can be compiled into a menu file which can be read and understood by the machine, and the effect of keeping the menu content secret is achieved.
In an embodiment of this embodiment, the performing the lexical validity check on the second information flow channel menu data includes: acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to the sentence pattern sequence; judging whether the syntax tree comprises syntax content of a preset syntax expression or not; when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity of the second information channel menu data passes the verification; and when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity check of the second information channel menu data is not passed.
The syntax setting expression of the present embodiment may be an expression of "condition and action", or may be an expression of "action and result".
In an embodiment of this embodiment, performing semantic validity check on the second information channel menu data includes: acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to the sentence pattern sequence; identifying semantic content of the word elements; judging whether the semantic content is matched with the grammar content of a preset grammar expression or not; when the semantic content is matched with the grammatical content of the preset grammatical expression, determining that the second information channel menu data passes semantic validity check; and when the semantic content is not matched with the grammatical content of the preset grammatical expression, determining that the second information channel menu data does not pass the semantic validity check.
In one example, an electronic menu in an expression format such as "condition and action" is read into a compiler program by writing the compiler program, the compiler program identifies and marks each character of the menu file and basic elements forming a sentence such as custom reserved characters one by one until the whole menu file is analyzed, and the process is called lexical analysis (or lexical validity check); on the basis of lexical analysis, a lexical element sequence of the lexical analysis is verified according to a predefined grammar rule, for example, the grammar defined rule is that an expression is formed by 'conditions and results', the sequence is checked by using the rule, if only the 'conditions' exist in the sequence but the 'results' are lost, the sequence is considered not to meet the grammar requirement, the whole lexical result is checked through the grammar rule, and finally, an analysis result of a tree-shaped structure represented by symbols is formed, wherein the process is grammar analysis; on the basis of the syntax tree, semantic analysis (or semantic validity check) can be further performed, meaning expressed by symbols of the syntax tree is analyzed to determine whether the meaning expressed by the symbols of the syntax tree is consistent in service, meaning, for example, "putting fragrance head and thickening" do not meet service requirements, because the thickening "can only occur as a condition and must be in front of the sum", generally speaking, the semantic analysis is to perform validity check on the service meaning expressed by the syntax symbols.
And S22, under the condition that the lexical validity check and/or the semantic validity check pass, determining to create a menu file according to the menu data of the second information channel.
Optionally, after creating the recipe file according to the second information channel recipe data, the method further includes: and responding to the search instruction of the target menu, and executing the menu file on the terminal equipment.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions 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) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a device for creating a menu file is further provided to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a menu file creation apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: an acquisition module 50, a conversion module 52, a creation module 54, wherein,
an obtaining module 50, configured to obtain first information channel menu data in a natural language format;
the conversion module 52 is configured to convert the first information channel menu data to obtain second information channel menu data;
and the creating module 54 is used for creating a menu file according to the second information channel menu data.
In one embodiment, the acquisition module comprises at least one of: the first acquisition unit is used for acquiring information prompt data of the menu in the natural language format of the first information flow channel; the second acquisition unit is used for acquiring the feeding operation data of the menu in the natural language format of the second information flow channel; and the third acquisition unit is used for acquiring the equipment action data of the menu in the natural language format in the third information flow channel.
Optionally, the conversion module includes: the identification unit is used for identifying semantic content in the first information channel menu data; a mapping unit for mapping the semantic content into a cooking term based on a preset cooking dictionary.
Optionally, the creating module includes: the identification unit is used for identifying operation information and time sequence information in the second information channel menu data; and the creating unit is used for creating a menu file according to the time sequence information and the operation information.
Optionally, the creating unit includes: a processing subunit, configured to allocate a target cooking information flow channel to which the operation information belongs according to semantics of the operation information, and determine a dotting time of the operation information on the target cooking information flow channel based on the timing information, where the target cooking information flow channel includes one of: a prompt information flow channel, a material information flow channel and an equipment information flow channel; the system comprises a loading subunit, a processing unit and a control unit, wherein the loading subunit is used for loading a template file, and the template file comprises a time axis and at least one cooking information flow channel; and the dotting subunit is used for dotting the operation information at an information flow channel position corresponding to the dotting time on the target cooking information flow channel of the template file.
Optionally, the target cooking information flow path includes one of: a prompt information flow channel, a material information flow channel and an equipment information flow channel.
Optionally, the apparatus further comprises: the verification module is used for carrying out lexical validity verification on the second information flow channel menu data and/or carrying out semantic validity verification on the second information flow channel menu data before the creation module creates the menu file according to the second information flow channel menu data; and the determining module is used for determining to create the menu file according to the second information flow channel menu data under the condition that the lexical validity check and/or the semantic validity check pass.
Optionally, the verification module includes: the first obtaining unit is used for obtaining a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements formed according to a sentence pattern sequence; the first judging unit is used for judging whether the grammar tree comprises grammar contents of a preset grammar expression; the first determining unit is used for determining that the second information channel menu data passes lexical validity check when the grammar tree comprises grammar contents of a preset grammar expression; and when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity check of the second information channel menu data is not passed.
Optionally, the verification module includes: a second obtaining unit, configured to obtain a syntax tree of the second information channel menu data, where the syntax tree includes multiple morphemes formed according to a sentence pattern sequence; an identifying unit for identifying semantic content of the word element; the second judgment unit is used for judging whether the semantic content is matched with the grammar content of a preset grammar expression; the second determining unit is used for determining that the second information channel menu data passes semantic validity check when the semantic content is matched with the grammar content of a preset grammar expression; and when the semantic content is not matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data does not pass the semantic validity check.
Optionally, the apparatus further comprises: and the execution module is used for responding to a search instruction of a target menu and executing the menu file on the terminal equipment after the creation module creates the menu file according to the second information flow channel menu data.
The method provided by the first embodiment of the application can be executed in a mobile terminal, a processor, cooking equipment, an automatic cooker and the like. Taking the mobile terminal as an example, fig. 6 is a block diagram of a hardware structure of the mobile terminal according to an embodiment of the present invention. As shown in fig. 6, the computer 10 may include one or more (only one shown in fig. 6) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 6 is illustrative only and is not intended to limit the structure of the computer. For example, computer 10 may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for creating a menu file in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to computer 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communications provider of computer 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in an aspect of the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring first information channel menu data in a natural language format;
s2, converting the first information channel menu data to obtain second information channel menu data;
and S3, creating a menu file according to the second information channel menu data.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in an aspect of this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring first information channel menu data in a natural language format;
s2, converting the first information channel menu data to obtain second information channel menu data;
and S3, creating a menu file according to the second information channel menu data.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method of creating a recipe file, comprising:
acquiring first information channel menu data in a natural language format;
converting the first information channel menu data to obtain second information channel menu data;
and creating a menu file according to the menu data of the second information flow channel.
2. The method of claim 1, wherein obtaining first information channel menu data in natural language format comprises at least one of:
acquiring information prompt data of the menu in a natural language format in a first information flow channel;
acquiring the feeding operation data of the menu in the natural language format of the second information flow channel;
and acquiring the equipment action data of the menu in the third information flow channel in the natural language format.
3. The method of claim 1, wherein converting the information channel recipe data comprises:
identifying semantic content in the first information channel menu data;
mapping the semantic content to cooking terms based on a preset cooking dictionary.
4. The method of claim 1, wherein creating a recipe file from the second information channel recipe data comprises:
identifying operation information and time sequence information in the second information channel menu data;
and creating a menu file according to the time sequence information and the operation information.
5. The method of claim 4, wherein creating a recipe file based on the timing information and the operation information comprises:
distributing a target cooking information flow channel to which the operation information belongs according to the semantics of the operation information, and determining the dotting time of the operation information on the target cooking information flow channel based on the time sequence information;
loading a template file, wherein the template file comprises a time axis and at least one cooking information flow channel;
and dotting the operation information at an information flow channel position corresponding to the dotting time on the target cooking information flow channel of the template file.
6. The method of claim 5, wherein the target cooking information flow path comprises part or all of a reminder information flow path, a material information flow path, and an equipment information flow path.
7. The method of claim 1, wherein prior to creating a recipe file from the second information channel recipe data, the method further comprises:
performing lexical validity check on the second information flow channel menu data, and/or performing semantic validity check on the second information flow channel menu data;
and under the condition that the lexical validity check and/or the semantic validity check pass, determining to create a menu file according to the second information channel menu data.
8. The method of claim 7, wherein the lexical validity check of the second information channel recipe data comprises:
acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to a sentence pattern sequence;
judging whether the syntax tree comprises syntax content of a preset syntax expression or not;
when the grammar tree comprises grammar contents of a preset grammar expression, determining that the second information channel menu data passes lexical validity check; and when the grammar tree comprises grammar contents of a preset grammar expression, determining that the lexical validity check of the second information channel menu data is not passed.
9. The method of claim 7, wherein performing semantic validity check on the second information channel recipe data comprises:
acquiring a syntax tree of the second information channel menu data, wherein the syntax tree comprises a plurality of word elements which are formed according to a sentence pattern sequence;
identifying semantic content of the word element;
judging whether the semantic content is matched with the grammatical content of a preset grammatical expression;
when the semantic content is matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data passes semantic validity check; and when the semantic content is not matched with the grammatical content of a preset grammatical expression, determining that the second information channel menu data does not pass the semantic validity check.
10. An apparatus for creating a menu file, comprising:
the acquisition module is used for acquiring first information channel menu data in a natural language format;
the conversion module is used for converting the first information channel menu data to obtain second information channel menu data;
and the creating module is used for creating a menu file according to the second information channel menu data.
11. The apparatus of claim 10, wherein the conversion module comprises:
the identification unit is used for identifying semantic content in the first information channel menu data;
a mapping unit for mapping the semantic content into a cooking term based on a preset cooking dictionary.
12. The apparatus of claim 10, wherein the creation module comprises:
the identification unit is used for identifying operation information and time sequence information in the second information channel menu data;
and the creating unit is used for creating a menu file according to the time sequence information and the operation information.
13. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 9 when executed.
14. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 9.
CN201911207155.1A 2019-11-29 2019-11-29 Menu file creating method and device, storage medium and electronic device Withdrawn CN111104630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911207155.1A CN111104630A (en) 2019-11-29 2019-11-29 Menu file creating method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911207155.1A CN111104630A (en) 2019-11-29 2019-11-29 Menu file creating method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN111104630A true CN111104630A (en) 2020-05-05

Family

ID=70421203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911207155.1A Withdrawn CN111104630A (en) 2019-11-29 2019-11-29 Menu file creating method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111104630A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470181A (en) * 2021-06-11 2022-12-13 珠海优特智厨科技有限公司 Menu file generation method and device and electronic device
WO2024230350A1 (en) * 2023-05-10 2024-11-14 浪潮电子信息产业股份有限公司 Text encoding method and apparatus, model training method and apparatus, and model matching method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470181A (en) * 2021-06-11 2022-12-13 珠海优特智厨科技有限公司 Menu file generation method and device and electronic device
WO2024230350A1 (en) * 2023-05-10 2024-11-14 浪潮电子信息产业股份有限公司 Text encoding method and apparatus, model training method and apparatus, and model matching method and apparatus

Similar Documents

Publication Publication Date Title
CN107077529B (en) Method and system for recipe management
Wijeratne et al. Emojinet: An open service and api for emoji sense discovery
US11727302B2 (en) Method and apparatus for building a conversation understanding system based on artificial intelligence, device and computer-readable storage medium
CN105243055B (en) Based on multilingual segmenting method and device
CN111104194B (en) Menu file display method and device, storage medium and electronic device
WO2018113096A1 (en) Recipe program code generation method and recipe compilation cloud platform and system
Larassati et al. Google vs. Instagram machine translation: multilingual application program interface errors in translating procedure text genre
CN108664665A (en) Data format method for transformation, device, equipment and readable storage medium storing program for executing
WO2025025441A1 (en) Task processing method and apparatus, and electronic device, computer-readable storage medium and computer program product
US20190050376A1 (en) Automatic value formatting based on intrinsic structural semantics
US20190371319A1 (en) Method for human-machine interaction, electronic device, and computer-readable storage medium
CN111104630A (en) Menu file creating method and device, storage medium and electronic device
CN112069775B (en) Data conversion method and device, storage medium and electronic device
KR20150117914A (en) Language learning system by a plurality of Users
US9547645B2 (en) Machine translation apparatus, translation method, and translation system
JP2016164707A (en) Automatic translation device and translation model learning device
CN106933811A (en) A kind of entry automatic generation method and device
CN111444725A (en) Statement generation method, device, storage medium and electronic device
CN105930166B (en) A method of based on WEB interface ejection layer
KR20200094853A (en) Electronic device and Method for controlling the electronic device thereof
KR102640887B1 (en) Method and electronic device for generating multilingual website content
JP2019053461A (en) Image processing apparatus, program and image data
Agarwal et al. Building hierarchically disentangled language models for text generation with named entities
CN105760152A (en) Cloud integrated information cooperation platform for film and television production management and analysis
CN109683727A (en) A kind of data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200505

WW01 Invention patent application withdrawn after publication