Method and device for generating cue word, equipment, medium and program product

By providing structured prompt word units, users can quickly generate target prompt words, solving the inefficient problem of users manually entering prompt words and improving data processing efficiency.

CN120632031APending Publication Date: 2025-09-12BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510719750.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In complex data processing scenarios, users need to manually type prompt words to call machine learning models, resulting in inefficient operations.

Method used

Provides structured prompt word units. Users can generate target prompt words by selecting these units, simplifying the prompt word generation process and improving user efficiency.

Benefits of technology

It significantly improves the efficiency of users in processing data using machine learning models and simplifies the prompt word generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632031A_ABST
    Figure CN120632031A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for generating cue words, equipment, a storage medium and a computer program product. The method comprises the steps that one or more cue word units selected by a user are determined, wherein the cue word units indicate the content of corresponding cue words and attributes for the cue words; and according to the selected one or more cue word units, generating a target cue word based on the content of the corresponding cue word indicated by the cue word unit and the attribute for the cue word. According to the method disclosed by the embodiment of the invention, the user can efficiently understand the content of the corresponding cue word and various attributes for the cue word, and the target cue word is efficiently generated based on the content of the corresponding cue word indicated by the cue word unit and the attributes for the cue word according to the selected one or more cue word units; this may improve the efficiency of processing data by a user using a machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates generally to the field of computers, and more particularly to a method, apparatus, device, computer-readable storage medium, and computer program product for generating prompt words. Background Art

[0002] Machine learning models are developing rapidly. Trained on vast amounts of text data, these models have developed strong language understanding and generation capabilities, enabling them to perform a variety of tasks, including translation, writing, and question-answering. Prompts, a crucial method for interacting with machine learning models, guide the model's output through instructions or questions. Appropriate prompts can enable machine learning models to achieve diverse functions, from basic question-answering to complex logical processing.

[0003] This human-computer interaction method has transformed information processing and knowledge production. Optimizing prompts can improve the efficiency of content creation, data analysis, and other tasks. The combination of machine learning models and prompts has impacted multiple industries, including education, scientific research, and code development, driving development in these areas. Summary of the Invention

[0004] According to example embodiments of the present disclosure, a method, apparatus, device, computer storage medium, and computer program product for generating prompt words are provided.

[0005] In a first aspect of the present disclosure, a method for generating a prompt word is provided. The method includes determining one or more prompt word units selected by a user, where the prompt word units indicate the content of the corresponding prompt word and attributes of the prompt word. The method also includes generating a target prompt word based on the content of the corresponding prompt word and the attributes of the prompt word indicated by the prompt word units according to the one or more selected prompt word units.

[0006] In a second aspect of the present disclosure, a device for generating a prompt word is provided. The device includes a prompt word unit determination module configured to determine one or more prompt word units selected by a user, where the prompt word units indicate the content of the corresponding prompt word and attributes specific to the prompt word. The device also includes a prompt word generation module configured to generate a target prompt word based on the content of the corresponding prompt word and attributes specific to the prompt word indicated by the prompt word units, according to the one or more selected prompt word units.

[0007] In a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which instructions, when executed by the at least one processing unit, enable the electronic device to perform the method described in the first aspect of the present disclosure.

[0008] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, which has machine-executable instructions stored thereon, and when the machine-executable instructions are executed by a device, the device can perform the method described according to the first aspect of the present disclosure.

[0009] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer-executable instructions, wherein the computer-executable instructions implement the method described according to the first aspect of the present disclosure when executed by a processor.

[0010] The purpose of providing the summary of the invention section is to introduce a series of concepts in a simplified form, which will be further described in the detailed description below. The summary of the invention section is not intended to identify the key features or essential features of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure can be implemented;

[0012] Figure 2 A flow chart of a method for generating prompt words according to an embodiment of the present disclosure is shown;

[0013] Figure 3 A schematic diagram showing an atomic data structure according to an embodiment of the present disclosure;

[0014] Figure 4 A schematic diagram illustrating the entire life cycle of an atom according to an embodiment of the present disclosure is shown;

[0015] Figure 5 shows a schematic diagram of a combined atom according to an embodiment of the present disclosure;

[0016] Figure 6 A schematic diagram of an atom management system according to an embodiment of the present disclosure is shown;

[0017] Figure 7 A schematic block diagram illustrating an example apparatus according to some embodiments of the present disclosure is shown;

[0018] Figure 8 A block diagram is shown of an example device that may be used to implement embodiments of the present disclosure.

[0019] Throughout the drawings, the same or similar reference numbers denote the same or similar elements. DETAILED DESCRIPTION

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information. It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, and usage scenarios of the personal information involved in this disclosure should be informed to the user in an appropriate manner in accordance with relevant laws and regulations, and the user's authorization should be obtained.

[0021] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thereby, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0024] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. can refer to different or the same objects, unless explicitly stated otherwise. Other explicit and implicit definitions may also be included below.

[0025] When using machine learning models to process data, users must provide prompts each time, for example, by manually typing in the prompts, so that the machine learning model can process the data based on the prompts. In complex data processing scenarios, if a machine learning model is called to generate code and requires the model to utilize an existing functional component during the generation process, users must manually enter the code for that component, along with usage examples, which is very cumbersome. This user-provided prompt method is highly inefficient.

[0026] To address this issue, the present disclosure proposes a method for generating prompt words. This method provides prompt word units to users using machine learning models. These prompt word units are the product of pre-structured prompt word processing, effectively allowing users to understand the corresponding prompt word content and various attributes of the prompt word. By generating target prompt words based on the selected prompt word units, the corresponding prompt word content indicated by the prompt word units, and the attributes of the prompt word, the prompt word generation process can be greatly simplified, significantly improving the efficiency of users processing data using machine learning models.

[0027] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Figure 1 A schematic diagram of an example environment 100 in which the embodiments of the present disclosure can be implemented is shown. An electronic device 110 is included in the example environment 100. In this embodiment, the method of the embodiment of the present disclosure is performed by the electronic device 110. The electronic device 110 has a flexible calling method. It can install an application program specifically used to call the machine learning model, such as various client programs, or it can use a browser that supports related functions to implement the call to the machine learning model. In terms of network communication, the electronic device 110 establishes a connection with other computing devices deployed with machine learning models through the network. During this communication process, the electronic device 110 is responsible for sending user requests containing user needs and carefully generated prompt words to the other party, and at the same time receives the machine learning model processing results fed back from the other party's electronic device, thereby completing data interaction and function implementation.

[0028] In some embodiments, when the user starts the application installed on the electronic device 110, a Figure 1 The front-end interface is shown. The prompt word unit library 112 serves as an interactive entry point. Clicking on it allows the user to enter the prompt word unit library 112. The electronic device 110 has pre-organized and stored a large number of structured prompt word units in the prompt word unit library 112. The user can select one or more prompt word units that meet their needs based on their data processing requirements.

[0029] After the user clicks on the prompt word unit library 112, a card of the prompt word unit may be displayed below the dialog box with the machine learning model for the user to select. Figure 1 A card 114 for a prompt word unit and a card 116 for a prompt word unit are shown. A selection box is provided in the upper right corner of the card. When the user selects a prompt word unit, the selection box will display a check mark pattern, making it convenient for the user to quickly confirm the selected content. In some embodiments, each card is mainly divided into three core parts. The first is the prompt word unit name, which is used to concisely and clearly identify the prompt word unit. The second is the prompt word unit function, which details the specific role and function that the prompt word unit can achieve in the data processing process. The third is the prompt word content, which presents key information that can actually be used for machine learning models to process data. Users can quickly make selections and decisions through these clear displays.

[0030] In some embodiments, the electronic device 110 can set a sorting method and search tools for the prompt word unit library 112 to facilitate users to quickly find the prompt word units they need. In some embodiments, the electronic device 110 records in real time the number of times each prompt word unit is selected and used by the user. When the user opens the prompt word unit library 112, the electronic device 110 defaults to sorting and displaying the prompt word units by frequency of use from high to low. For example, in a code generation scenario, the prompt word unit "Generate code for calling database connection function component" will be prioritized and displayed at the top of the prompt word unit library 112 because it is frequently used in development work.

[0031] In some embodiments, the electronic device 110 sets a keyword search box in the prompt word unit library 112 interface. In some embodiments, the prompt word unit is provided with multiple fields for recording the content of the prompt word and the attributes of the prompt word. When the user enters a keyword in the search box, such as "database connection", the electronic device 110 can search the name, function description and prompt word content fields of all prompt word units. If these fields contain the "database connection" keyword, the corresponding prompt word unit card will be screened out and displayed to the user in order of matching degree. In some embodiments, the matching degree calculation rule is that the prompt word unit that fully matches the keyword is displayed first, and the prompt word unit that partially matches and has the keyword appearing in the front position is second, so as to help the user quickly locate the required prompt word unit.

[0032] In some embodiments, the electronic device 110 provides a categorized search tool. Based on the value of the category field of each prompt word unit, the electronic device 110 categorizes the prompt word units in the prompt word unit library 112 into multiple categories, such as code generation, data processing, and text analysis. A user can click a category label, such as "Data Processing," and the electronic device 110 will only display prompt word units with the value of the category field set to "Data Processing."

[0033] In some embodiments, the electronic device 110 learns the user's preference for prompt word units by analyzing the user's historical usage records. For example, when a user frequently selects "Text Sentiment Analysis Prompt Word Unit" and "Text Summary Generation Prompt Word Unit" when using a machine learning model for natural language processing tasks, the electronic device 110 determines that the user prefers prompt word units related to natural language processing. When the user clicks on the prompt word unit library 112 again, the electronic device 110 can prioritize the prompt word units in the natural language processing category and appropriately enlarge the display size of these prompt word unit cards to highlight them.

[0034] In some embodiments, the electronic device 110 determines one or more prompt word units selected by the user, wherein the prompt word unit indicates the content of the corresponding prompt word and attributes specific to the prompt word. The attributes specific to the prompt word include the aforementioned displayed prompt word unit name, prompt word unit function, and prompt word content. In addition, the attributes may also include other aspects of content, such as the creation timestamp, creator, etc., which may also be displayed or not.

[0035] In some embodiments, the electronic device 110 generates a target prompt word 118 based on the content of the corresponding prompt word indicated by the selected one or more prompt word units and the attributes of the prompt word. For example, the prompt word content corresponding to each prompt word unit can be obtained from the value of the prompt word content field of the selected one or more prompt word units to generate the target prompt word 118. In some embodiments, the electronic device 110 extracts the corresponding value from the prompt word content field of the selected prompt word unit to obtain the specific prompt word content of each prompt word unit, and then integrates these contents according to preset combination logic to generate the target prompt word 118. The generated target prompt word 118 can be displayed in a dialog box in a timely manner. The user can further modify, supplement, delete, and other adjustments to the target prompt word 118 in the dialog box based on their own data processing requirements to ensure that the final generated prompt word meets data processing requirements and achieves efficient data processing results.

[0036] In some embodiments, an effect preview module may also be provided at the bottom of the card. If a user requests a preview of the effect of the target prompt word unit, a schematic effect is obtained based on the address in the effect preview field. The schematic effect may be, for example, a diagram of the effect of running a component. In some embodiments, the schematic effect is presented to the user via a display device.

[0037] In this embodiment, the electronic device 110 can provide prompt word units to users using machine learning models. These prompt word units are the result of deeply structured processing of traditional prompt word units. By integrating and classifying scattered and disordered prompt word information according to specific rules, standardized and modular prompt word units are formed. To further improve users' understanding and efficiency of using prompt word units, multiple fields are provided in the prompt word units. These fields respectively define the content of the prompt word and its various attributes in detail. By viewing these fields, users can quickly and comprehensively grasp the specific content, functional characteristics, and other relevant attribute information of the corresponding prompt word. Based on this clear and unambiguous information, users can make more accurate choices and select prompt word units that meet their needs. The electronic device 110 then generates the target prompt word based on the one or more prompt word units selected by the user, the content of the corresponding prompt word indicated by the prompt word unit, and the attributes of the prompt word. This greatly simplifies the prompt word generation process and significantly improves the efficiency of users processing data using machine learning models.

[0038] As understood by those skilled in the art, examples of electronic device 110 may be any type of mobile computing device, including a mobile computer (e.g., a personal digital assistant, a laptop computer, a notebook computer, a tablet computer, a netbook, etc.), a mobile phone (e.g., a cellular phone, a smartphone, etc.), a wearable computing device (e.g., a smart watch, a head-mounted device, including smart glasses, etc.), or other types of mobile devices.

[0039] It should be understood that the architecture and functions in the example environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. The embodiments of the present disclosure may also be applied to other environments with different structures and / or functions.

[0040] The following will describe in detail the process according to the embodiments of the present disclosure in conjunction with other figures. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0041] Figure 2A flowchart of a method 200 for generating prompt words according to certain embodiments of the present disclosure is shown. In this embodiment, the method can be performed by the electronic device 110. In box 202, one or more prompt word units selected by the user are determined. The prompt word unit indicates the content of the corresponding prompt word and the attributes of the prompt word. The prompt word unit is a standardized, modular information set formed by structuring traditional prompt words, and can be, for example, an atom. It integrates the originally scattered prompt word content and related information into a whole, making it easier for the user to quickly understand and use it, and is the basic unit for generating the target prompt word.

[0042] In block 204, a target prompt word is generated based on the content and attributes of the corresponding prompt word indicated by the prompt word unit, based on the selected one or more prompt word units. The target prompt word is the final prompt word generated after processing the content and attributes of the corresponding prompt word extracted from the one or more prompt word units selected by the user from the prompt word unit library. This target prompt word will be used to convey the user's needs to the machine learning model to achieve a specific data processing task. If multiple prompt word units are selected, these prompt word units can be combined according to preset combination rules. In some embodiments, a sequential splicing combination method can be adopted, that is, the content of each prompt word is connected in sequence according to the order in which the user selected the prompt word units. In some embodiments, necessary separators or conjunctions can be automatically added during the splicing process to make the generated target prompt word semantically coherent and logically smooth. For example, if the user selects the two prompt word units "Extract text keywords" and "Generate tags based on keywords", the contents of the two can be spliced ​​together to form "Extract text keywords, then generate tags based on keywords".

[0043] According to the method of the embodiment of the present disclosure, prompt word units are provided to users who use machine learning models. These prompt word units are the products of pre-structural processing of prompt words, which can efficiently let users understand the corresponding prompt word content and various attributes of the prompt words. By generating target prompt words based on the selected prompt word units, the corresponding prompt word content indicated by the prompt word units, and the attributes of the prompt words, the prompt word generation process can be greatly simplified, and the efficiency of users in processing data using machine learning models can be significantly improved.

[0044] Figure 3A schematic diagram of the data structure of an atom according to an embodiment of the present disclosure is shown. In this embodiment, the atom includes multiple fields 310, and the multiple fields 310 include a prompt word content field "promptContent" and at least one of the following fields: an identifier field "id", a name field "name", a category field "category", a function description field "description", an author field "authorId", or a creation timestamp field "createTime". In some implementations, the atom may include two fields, such as a name field and a prompt word content field. Fields are basic information items that make up a prompt word unit, and each field has a specific definition and purpose. Different fields are used to describe the content of the prompt word and various attributes related to the prompt word. Through the combination of multiple fields, the detailed information of the prompt word unit is presented comprehensively and clearly. These fields do not need to be included in the atom in full, and can be partially included in the atom and partially not included in the atom.

[0045] In some embodiments, the identifier field is used to assign a unique identifier to each atom, which can be generated, for example, by using a UUID (universally unique identifier) ​​or a self-incrementing digital code. In some embodiments, the identifier field serves as the primary key of the atom and is used to uniquely identify each atom record in the database table, facilitating data storage, retrieval, and management. When the electronic device 110 needs to locate a certain atom, it can quickly find the corresponding record in the database by simply using the value of the identifier field, avoiding confusion caused by similar names or other attributes.

[0046] In some embodiments, the name field uses concise and refined text to name the atom, and the general length is controlled within 20 characters, so that users can quickly identify the core functions of the atom. The formulation of the name follows certain naming conventions, such as the "function + object" format, such as "image recognition code generation", "user data cleaning", etc. In terms of storage, the name field uses a string type, which supports Chinese, English, numbers and some special characters. When the atom library is sorted and displayed, the name field can be used as one of the sorting criteria, such as alphabetical order or pinyin order, to facilitate users to quickly browse and find. At the same time, when the user performs a fuzzy search, the content of the name field can be matched first. If the name contains keywords entered by the user, the corresponding atom can be displayed first.

[0047] In some embodiments, the category field is used to categorize and manage atoms, dividing numerous atoms into different functional categories, such as code generation, data processing, and text analysis. In the interface design of the atom library, the category field is often used to generate a navigation bar or filter menu. Users can quickly filter out atoms belonging to that category by clicking on different category labels. For example, when a user needs to generate code, they click on the "Code Generation Category" label, and the electronic device 110 will query the database for all atoms with the category field value "Code Generation Category" and display them to the user.

[0048] In some embodiments, the function description field provides a detailed and comprehensive description of the function of the atom, generally using a paragraph-style text description. This field can not only explain the specific functions that the atom can achieve, but in some embodiments, this field can also explain its applicable scenarios, advantages and characteristics, and other information. For example, for the "user data cleaning" atom, the value of the function description field can be "This atom is used to clean the original data entered by the user, and can automatically identify and process missing values, duplicate values, and outliers in the data. It is suitable for scenarios such as data analysis and data modeling. Through efficient data cleaning algorithms, it can greatly improve data quality and lay the foundation for subsequent data processing and analysis."

[0049] In some embodiments, the prompt word content field is the core part of the atom, storing the data processing instructions or text content actually used for the machine learning model. Its format depends on the specific application scenario. In the code generation scenario, it may be a code snippet of a programming language. The amount of data in this field is relatively large, and a large text type is used for storage. When the user selects an atom to generate a target prompt word, the electronic device 110 directly extracts the value of the field and processes it according to the preset combination rules. In order to ensure the accuracy and validity of the prompt word content, in some embodiments, the content of the field is subjected to syntax checking and format verification. For example, for a code snippet, the syntax parser of the corresponding programming language will be called for inspection. If there is a syntax error, a prompt will be given when the user selects the atom, and it will be prohibited to use it to generate the target prompt word.

[0050] In some embodiments, the creator field records the name of the user or team that created the atom and is stored as a string type. The data source is the account information of the user logged in when creating the atom or the team name specified by the system administrator. In some embodiments, in the display interface of the atom library, the information of the creator field can be displayed selectively, and the user can view detailed creator information by clicking the More Information button on the atom card. In some embodiments, the atoms created by different creators can be managed according to the creator's permission settings, such as restricting some users from modifying or deleting atoms created by specific creators.

[0051] In some embodiments, the creation timestamp field records the specific time when the atom is created. In some embodiments, when a new atom is created, the electronic device 110 can automatically obtain the current system time and convert it into a timestamp format and store it in the field. The creation timestamp field can be used for sorting and displaying the atom library, such as arranging them in chronological order according to the creation time, so that users can quickly understand the update status of the atom. In some embodiments, the creation timestamp field is used for version management. When an atom is updated, the system will record the update time and compare it with the creation time, so that users can view the version history conveniently. In some embodiments, multiple fields include an update timestamp field. After the atom creator modifies the atom, an updated version of the atom can be obtained, and the modification time is recorded in the update timestamp field. This helps to enable users to choose the atom version. In some embodiments, different versions of atoms can also be compared to make it easier for users to understand the differences.

[0052] Apart from Figure 3 The fields shown in the figure, the data structure of the atom may also include other fields. In some embodiments, the multiple fields also include a source atom identifier field. The source atom identifier field indicates which atom the atom is derived from. Based on this, the electronic device 110 can provide the user with richer functions. In some embodiments, the first atom of the selected one or more atoms is copied. For example, the value of the prompt word content field of the first atom can be copied to the dialog box with the machine learning model. In some embodiments, the content of the prompt word content field of the first atom is modified according to user input to obtain the prompt word content of the second atom. The user can modify and edit the prompt word in the dialog box to obtain customized prompt word content. In some embodiments, the user can trigger a save operation to save the edited prompt word content, and the electronic device 110 can set up a new second atom, which is saved in the prompt word content field of the second atom. In some embodiments, the source atom identifier field of the second atom is set to the identifier of the first atom. In this way, it can be made clear that the second atom is an atom derived from the first atom.

[0053] In some embodiments, the plurality of fields further includes an environment variable field, the prompt word content field includes an environment variable, and attributes of the environment variable are added to the environment variable field, where the attributes of the environment variable include at least one of a variable name, necessity, and a variable description. In some cases, the prompt word content in an atom refers to some variables whose values ​​are not constant, requiring the user to provide the values ​​of the environment variables when using the atom.

[0054] For example, atom A is used to search for surrounding information of a certain location on a map. The prompt word content of atom A involves calling a third-party application programming interface (API), which can search for surrounding information of a certain location on a map and feedback the information. The call address, request method, etc. of the third-party application programming interface are provided in the prompt word content. The third-party application programming interface requires the input of the correct key to be called by the user, and the user can, for example, apply for the key from others. In this regard, the prompt word content also includes a placeholder "process.env.key" (key is a variable name). The placeholder is a placeholder for the environment variable representing the key and needs to be provided by the user who selected the atom. In some embodiments, if one or more selected atoms are injected into the target prompt word, the user is prompted to enter the value for the environment variable. For example, the variable name, necessity and variable description in the environment variable field of the atom can be displayed to the user. In some embodiments, the variable description is used to explain the function and application entry of the environment variable. If the key applied for by the user is "ABC15", the user can enter the key "ABC15". In some embodiments, the value of the environment variable is injected into the target prompt word. The electronic device 110 may replace the placeholder "process.env.key" with the key to automatically complete the prompt word.

[0055] Figure 4 A schematic diagram of the full life cycle of an atom according to an embodiment of the present disclosure is shown. At 402, an atom is created, a unique identifier is assigned to the atom, and storage space is allocated. At 404, if the atom needs to input an environment variable, the environment variable field is configured for the atom. For example, the attributes of the environment variable are added to the environment variable field, and the attributes of the environment variable include at least one of the variable name, necessity, and variable description. In the setting of the environment variable field, a structured data storage format such as JSON or XML is adopted. In some embodiments, the necessity field is defined by an enumeration type, and the value is "required" (required) or "optional" (optional), and the atom is subsequently checked when it is used according to the attribute. In some embodiments, if it is a required environment variable, when the user has not configured it, a prompt box can pop up to ask the user to input it, otherwise the atom is prohibited from running. In some embodiments, if it is an optional variable, when the user has not input it, a default value is used or the processing of the variable is skipped.

[0056] At 406, prompt word content is written for the atom. This prompt word content is the content that the user wants to reuse when the atom is selected. In some embodiments, for text prompt words, a grammar checker can be provided to check the prompt word's grammatical structure and keyword usage in real time. For example, in atoms related to natural language processing, if the prompt word contains specific instruction keywords such as "generate," "extract," or "classify," the grammar checker can ensure that the use of these keywords conforms to predetermined grammatical rules to avoid semantic ambiguity or errors. In some embodiments, for code prompt words, corresponding code editor plug-ins can be integrated according to different programming languages. These plug-ins provide functions such as code highlighting, automatic completion, and syntax error prompts. The system also supports version control, recording the modification history of the prompt word, making it easier for users to review and compare the prompt word content of different versions. In some embodiments, users can insert variable placeholders in the prompt word. For example, when the user configures environment variables at 404, these placeholders will be replaced by the user-entered environment variables when the atom is run, increasing the flexibility and reusability of the prompt word.

[0057] At 408, the visibility field of the atom is set. The visibility field indicates whether the corresponding prompt word unit is visible. The visibility field of the atom is stored and managed using a Boolean value or an enumeration type. When an enumeration type is used, the value can be "public", "private", or "group". For public atoms, all users who have access to the atom library can view and use them. Private atoms are only visible to the creator, and other users cannot obtain relevant information. Group-visible atoms are limited to being visible within a specific user group, and the definition and member management of the group are the responsibility of the system administrator or group creator. At 410, atoms are published, such as adding atoms to the atom library. Published atoms can be shared and reused, which provides a complete mechanism for atomic sharing. By reusing atoms, the duplication of work of professional and technical personnel can be significantly reduced, and development efficiency can be improved by more than 50%. In addition, non-professional technicians can quickly build applications with specific functions or components by reusing and combining atoms, lowering the technical threshold. In the embodiments of the present disclosure, prompt words are structured into atoms that can be used independently, in combination, or in fusion, thereby improving the efficiency of users in processing data using machine learning models.

[0058] At 412, the published atom can be derived. The atom fork function allows the user to create a new atom based on the published atom. During the derivation process, the values ​​of most fields of the original atom can be copied, including environment variable fields, prompt word content, and visibility settings. However, in order to distinguish the derived atom from the original atom, the system will generate a new unique identifier for the derived atom and record its derivation source (i.e., the identifier of the original atom) in the source prompt word unit identifier field. Then proceed to 406 to write the prompt word through the modification operation and complete the subsequent operations.

[0059] At 414, if the published atom is visible to a user, the user can select the atom to reuse its prompt word. Figure 1 As described above, atoms can be reused through selection operations without the user having to provide prompt words themselves, which can improve the efficiency of users using machine learning models to process data. At 416, the atoms selected by the user include a first atom and a second atom, and by combining the first atom and the second atom, a target prompt word is generated based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word. By combining atoms, users can reuse prompt words for multiple atoms at the same time, which can further improve the efficiency of users using machine learning models to process data.

[0060] In this embodiment, the Atom Library builds an open, shared ecosystem, breaking down information barriers between technical personnel. Developers can upload their high-quality atoms to the Atom Library, enabling knowledge and resource sharing. As business needs continue to change and evolve, applications that call machine learning models require flexible scalability. The Atom Library provides a convenient way to expand applications, allowing applications that call machine learning models to quickly introduce new atoms through simple access operations. Whether adding new functional modules or optimizing and upgrading existing functions, there is no need for large-scale application reconstruction. This atom-based expansion approach allows applications that call machine learning models to flexibly adjust their functional architecture to adapt to business needs at different stages. By establishing a unified atomic data structure, the standardization and normalization of atoms is promoted. The standardized development model ensures that atoms created by different developers have a unified format and standard, improving code readability and maintainability. During the application development process, a system built based on standardized atoms makes it easier to carry out subsequent functional expansion, code review, and troubleshooting, reducing system maintenance costs. It also facilitates team collaboration and ensures the quality and stability of project development. In addition, it avoids repeated development of similar functions, saves computing resources and manpower costs, solves problems such as chaotic prompt word management, difficulty in reuse, and limited combinations, and provides a new prompt word unit sharing mechanism.

[0061] Figure 5A schematic diagram of combining atoms according to an embodiment of the present disclosure is shown. At 502, a user selects atoms to be reused from an atom library. At 504, a determination is made as to whether the number of selected atoms is greater than one. If not, meaning the user has only selected one atom, at 506, a prompt word is determined based on the atom. For example, the values ​​of all fields of the atom may be used as the prompt word.

[0062] If the number is greater than 1, it indicates that the user has selected multiple atoms. At 508, the multiple atoms are combined. In some embodiments, multiple fields of the first atom and multiple fields of the second atom are concatenated to obtain concatenated content. Not only can the values ​​of the prompt word content field be concatenated, but other fields, such as the function description field and the category field, can also be concatenated. In some embodiments, the concatenated content is used as the prompt word.

[0063] At 510, the combined content is checked for conflicts. If no conflicts exist, at 512, the combined result may be used as a prompt. If a conflict exists, the conflict is prompted at 514. For example, each atom may have priority information. Assume that the priority of atom A is greater than the priority of atom B, and the user selects both atom A and atom B. However, the combined length of atoms A and B exceeds a threshold. In this case, atom A may be retained at 516, while atom B may be discarded. This way, at least atom A can be reused, thereby improving the efficiency of the user's data processing using the machine learning model.

[0064] The conflict situation is not limited to this. In some embodiments, the selected atoms include atoms A and B, and it is detected whether atoms A and B have the same callable object. In some embodiments, if the same callable object exists, the user is prompted to modify the callable object of atom A or the callable object of atom B at 514. For example, the user selects atoms A and B, but the value of the prompt word content field of atoms A and B is set to a variable named speed. The speed variable may have different meanings in atoms A and B. If the spliced ​​content is directly sent to the machine learning model as a prompt word, the machine learning model may not be able to correctly use the speed variable. Therefore, it can be determined that there is a conflict between atoms A and B. At 516, the speed variable of one of the atoms is modified, for example, to another unique name. At 518, the updated combined content is determined as the user's prompt word. In some embodiments, it is only possible to check whether the environment variables between the prompt word units have the same name to prompt the user to modify and distinguish the environment variables.

[0065] In some embodiments, the selected one or more prompt word units depend on the third prompt word unit. At this time, the electronic device 110 can generate a target prompt word based on the selected one or more prompt word units and the third prompt word unit, based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word. For example, atom A represents the prompt word and its attributes of component A, but component A has a reference to component B. Component B is recorded in atom B. If atom B is not added, component A may not be implemented, and the user's reuse of atom A is invalid. Therefore, by adding dependent atoms, it is helpful to achieve multi-level atomic reuse, which is beneficial to improving the efficiency of users using machine learning models to process data.

[0066] Figure 6 A schematic diagram of an atom management system according to an embodiment of the present disclosure is shown. The system includes an atom storage module 602, an atom management module 604, an environment variable processing module 606, an atom combination module 608, a user authority control module 610, and a user interface module 612. The user interface module 612 filters and displays atoms in the display interface of the atom library based on the value of the visibility field.

[0067] For example, after a user logs into the system, the user authority control module 610 filters out atoms that are within the user's visible range based on the visibility fields of each atom and the user's authority, and notifies the user interface module 612 of these atoms. The user interface module 612 displays these filtered atoms. For operations such as adding, deleting, modifying, and checking atoms, the user authority control module 610 sets strict authority control, and only the creator of the atom or the user with corresponding management authority can make changes. When editing an atom, if the user authority control module 610 determines that the user has relevant authority, the operations such as adding, deleting, modifying, and checking atoms are completed through the atom management module 604, and the operation results are saved in the atom storage module 602. The atom storage module 602 is responsible for storing and indexing all atoms.

[0068] The user can select the atoms that he wants to reuse from the displayed atoms, and the environment variable processing module 606 detects whether the selected one or more atoms involve environment variables. If an atom involves an environment variable, and the user authority control module 610 indicates that the user has the authority to reuse the atom, the environment variable processing module 606 provides a prompt through the user interface module 612, prompting the user to enter the environment variable. After the user enters the value of the environment variable, the environment variable processing module 606 replaces the placeholder of the prompt word content of the corresponding atom with the value to make the atom reusable. The environment variable processing module 606 can send the replaced content to the atom combination module 608 for combination.

[0069] If multiple atoms are selected, the atom combination module 608 can obtain the data of these atoms from the atom storage module 602 and combine the selected atoms to obtain the combined content. If the user permission control module 610 indicates that the user has permission to reuse the multiple atoms, the atom combination module 608 will inject the combined content into the user's prompt word and display it through the user interface module 612.

[0070] In addition, the atom management module 604 can set a priority for each atom, clarifying the priority relationship between atoms. The atom management module 604 can also manage the dependency relationships between atoms. For example, if atom A depends on atom B, when atom A is selected and atom B is not selected, the atom management module 604 can obtain the data of atom B from the atom storage module 602 based on the dependency relationship and send it to the atom combination module 608 for combination.

[0071] In this embodiment, a system for managing atoms is provided, which allows multiple modules to work together and provides operations such as atomic reuse and combination, thereby improving the efficiency of users in processing data using machine learning models.

[0072] Figure 7 1 shows a schematic block diagram of an example apparatus 700 according to some embodiments of the present disclosure. The apparatus 700 may be implemented in software, hardware, or a combination of both. Figure 7 As shown, the apparatus 700 includes a prompt word unit determination module 710 and a prompt word generation module 720 .

[0073] In some embodiments, the prompt word unit determination module 710 may be configured to determine one or more prompt word units selected by the user, where the prompt word units indicate the content of the corresponding prompt word and the attributes of the prompt word. The prompt word generation module 720 may be configured to generate a target prompt word based on the content of the corresponding prompt word and the attributes of the prompt word indicated by the prompt word units according to the selected one or more prompt word units.

[0074] In some embodiments, the prompt word unit includes multiple fields, including a prompt word content field and at least one of the following fields: an identifier field; a name field; a category field; a function description field; an author field; or a creation timestamp field.

[0075] In some embodiments, the plurality of fields further include a source prompt word unit identifier field, and the apparatus 700 further includes a copy module configured to copy a first prompt word unit from the selected one or more prompt word units. The apparatus 700 further includes a modification module configured to modify the content of the prompt word content field of the first prompt word unit based on user input to obtain the prompt word content of the second prompt word unit. The apparatus 700 further includes a setting module configured to set the value of the source prompt word unit identifier field of the second prompt word unit to the identifier of the first prompt word unit.

[0076] In some embodiments, the multiple fields also include an environment variable field, the prompt word content field includes the environment variable, the attributes of the environment variable are added to the environment variable field, and the attributes of the environment variable include at least one of the variable name, necessity, and variable description.

[0077] In some embodiments, the apparatus 700 further includes a first prompting module configured to prompt the user to enter a value for the environment variable in response to the selected one or more prompt word units being injected into the target prompt word. The apparatus 700 further includes an injection module configured to inject the value of the environment variable into the target prompt word.

[0078] In some embodiments, the plurality of fields further include an effect preview field, and the apparatus 700 further includes an acquisition module configured to, in response to a user request to preview the effect of the target prompt word unit, acquire the schematic effect according to the address in the effect preview field. The apparatus 700 further includes a presentation module configured to present the schematic effect to the user.

[0079] In some embodiments, the plurality of fields further includes a visibility field, which indicates whether the corresponding prompt word unit is visible.

[0080] In some embodiments, the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, and the prompt word generation module 720 includes a combination module configured to generate a target prompt word based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word by combining the first prompt word unit and the second prompt word unit.

[0081] In some embodiments, the combination module includes a splicing module configured to splice multiple fields of the first prompt word unit and multiple fields of the second prompt word unit to obtain spliced ​​content. The combination module also includes a determination module configured to determine the spliced ​​content as the target prompt word.

[0082] In some embodiments, the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, the priority of the first prompt word unit is higher than the priority of the second prompt word unit, and the device 700 also includes a discarding module configured to retain the first prompt word unit in response to the length of the first prompt word unit and the second prompt word unit after being combined exceeding a threshold.

[0083] In some embodiments, the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, and the device 700 further includes a detection module configured to detect whether the first prompt word unit and the second prompt word unit have the same callable object. The device 700 further includes a second prompt module configured to prompt the user to modify the callable object of the first prompt word unit or the callable object of the second prompt word unit in response to the presence of the same callable object.

[0084] In some embodiments, the selected one or more prompt word units depend on a third prompt word unit, and the prompt word generation module 720 includes a second generation module configured to generate a target prompt word based on the selected one or more prompt word units and the third prompt word unit, based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word.

[0085] The division of modules or units in the embodiments of the present disclosure is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the disclosed embodiments may be integrated into a single unit, exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0086] Figure 8 8 is a block diagram of an example device 800 that can be used to implement embodiments of the present disclosure. Figure 8 The device 800 shown is merely an example and should not be construed as limiting the functionality and scope of the implementations described herein. Figure 1 The electronic device 110 described above can be used to perform the Figures 1 to 6 process.

[0087] like Figure 8As shown, device 800 is in the form of a general-purpose computing device. Components of device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage devices 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processing unit 810 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of device 800.

[0088] Device 800 typically includes multiple computer storage media. Such media can be any available media accessible to device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 820 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. Storage device 830 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks or any other media, which can be used to store information and / or data (e.g., training data for training) and can be accessed within device 800.

[0089] The device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 8 As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.

[0090] The communication unit 840 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the device 800 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the device 800 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0091] Input device 850 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 860 may be one or more output devices, such as a display, a speaker, or a printer. Device 800 may also communicate with one or more external devices (not shown) via communication unit 840, as needed, such as storage devices, display devices, or one or more devices that allow a user to interact with device 800, or any device that allows device 800 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0092] According to an example implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above. According to an example implementation of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.

[0093] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0094] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0095] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0096] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0097] While various implementations of the present disclosure have been described above, the foregoing descriptions are illustrative and non-exhaustive, and are not intended to limit the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A method for generating a prompt word, comprising: Determining one or more prompt word units selected by the user, wherein the prompt word units indicate the content of the corresponding prompt word and attributes of the prompt word; as well as According to the selected one or more prompt word units, a target prompt word is generated based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word.

2. The method according to claim 1, wherein the prompt word unit comprises a plurality of fields, wherein the plurality of fields comprises a prompt word content field and at least one of the following fields: Identifier field; Name field; Category field; Function description field; The creator field; or Create a timestamp field.

3. The method of claim 2, wherein the plurality of fields further includes a source cue word unit identifier field, and the method further comprises: copying a first prompt word unit among the selected one or more prompt word units; Modifying the content of the prompt word content field of the first prompt word unit according to user input to obtain the prompt word content of the second prompt word unit; as well as The value of the source prompt word unit identifier field of the second prompt word unit is set to the identifier of the first prompt word unit.

4. The method according to claim 2, wherein the multiple fields further include an environment variable field, the prompt word content field includes an environment variable, the attributes of the environment variable are added to the environment variable field, and the attributes of the environment variable include at least one of a variable name, necessity, and a variable description.

5. The method according to claim 4, further comprising: In response to the selected one or more prompt word units being injected into the target prompt word, prompting the user to input a value for the environment variable; as well as The value of the environment variable is injected into the target prompt word.

6. The method according to claim 2, wherein the plurality of fields further includes an effect preview field, and the method further comprises: In response to a user request to preview the effect of the target prompt word unit, obtaining a schematic effect according to the address in the effect preview field; as well as The illustrative effect is presented to the user. The method according to claim 2 , wherein the plurality of fields further comprises a visibility field, wherein the visibility field indicates whether a corresponding prompt word unit is visible.

8. The method according to claim 2, wherein the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, and generating a target prompt word according to the selected one or more prompt word units based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word comprises: The target prompt word is generated by combining the first prompt word unit and the second prompt word unit based on the content of the corresponding prompt word indicated by the prompt word unit and the attribute of the prompt word.

9. The method according to claim 8, wherein generating the target prompt word by combining the first prompt word unit and the second prompt word unit based on the content of the corresponding prompt word indicated by the prompt word unit and the attribute of the prompt word comprises: splicing multiple fields of the first prompt word unit and multiple fields of the second prompt word unit to obtain spliced ​​content; as well as The spliced ​​content is determined as the target prompt word.

10. The method according to claim 1, wherein the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, the priority of the first prompt word unit is higher than the priority of the second prompt word unit, and the method further comprises: In response to a combined length of the first prompt word unit and the second prompt word unit exceeding a threshold, the first prompt word unit is retained.

11. The method according to claim 1 , wherein the selected one or more prompt word units include a first prompt word unit and a second prompt word unit, the method further comprising: detecting whether the first prompt word unit and the second prompt word unit have the same callable object; as well as In response to the existence of the same callable object, the user is prompted to modify the callable object of the first prompt word unit or the callable object of the second prompt word unit.

12. The method according to claim 1 , wherein the selected one or more prompt word units are dependent on a third prompt word unit, and generating a target prompt word according to the selected one or more prompt word units based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word comprises: The target prompt word is generated according to the selected one or more prompt word units and the third prompt word unit, based on the content of the corresponding prompt word indicated by the prompt word unit and the attribute of the prompt word.

13. A device for generating a prompt word, comprising: a prompt word unit determination module configured to determine one or more prompt word units selected by a user, wherein the prompt word unit indicates the content of the corresponding prompt word and the attributes of the prompt word; as well as The prompt word generation module is configured to generate a target prompt word according to the selected one or more prompt word units, based on the content of the corresponding prompt word indicated by the prompt word unit and the attributes of the prompt word.

14. An electronic device comprising: at least one processing unit; At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to any one of claims 1 to 12.

15. A computer program product having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 12 when executed by a processor.