Method and device for adjusting natural language statement and storage medium

CN118922834APending Publication Date: 2024-11-08SIEMENS AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280094220.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing natural language generation technology is difficult to improve the readability and accuracy of generated sentences, especially in application scenarios that are sensitive to computing resources and operational complexity, and the artificial intelligence generation method requires a large amount of computing resources and high operational complexity.

Method used

Improve the readability and accuracy of statements by automatically adding prepositions based on placeholder type attributes and positions in natural language statements, and convert natural language statements into low-code representations to improve workflow execution efficiency.

Benefits of technology

It improves the readability and accuracy of natural language statements, reduces computing resource requirements, simplifies operation complexity, and improves workflow processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118922834A_ABST
    Figure CN118922834A_ABST
Patent Text Reader

Abstract

A method (100) and apparatus for adjusting a natural language statement, and a storage medium. The method (100) comprises: step 101: receiving a natural language statement comprising a placeholder, the placeholder comprising a type attribute, and the placeholder occupying a sentence component matching the type attribute; 102, determining the position of the placeholder in the natural language statement; and step 103, adding prepositions in the natural language statements based on the type attributes of the placeholders and the positions of the placeholders in the natural language statements. The prepositions are automatically added in the natural language statements through the placeholders, so that the readability and accuracy of the natural language statements can be improved. In addition, when the word order in the natural language statement is adjusted, the prepositions are correspondingly and automatically updated, so that the readability and accuracy of the statement are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and storage medium for adjusting natural language sentences Technical Field

[0001] The embodiments of the present application relate to the field of natural language processing technology, and in particular to a method, device, and storage medium for adjusting natural language sentences. Background Art

[0002] Natural language generation (NLG) is a branch of artificial intelligence and computational linguistics. The corresponding language generation system is a computer model based on language information processing. Its working process is the opposite of natural language analysis, starting from an abstract conceptual level and generating text by selecting and enforcing certain semantic and grammatical rules. Natural language generation technology utilizes artificial intelligence and linguistic methods to automatically generate understandable natural language text. Natural language generation technology reduces the difficulty of communication between humans and computers and is widely used in fields such as machine news writing and chatbots. It has become a hot topic in artificial intelligence research.

[0003] At present, how to improve the readability and accuracy of generated natural language sentences is a technical problem that needs to be solved.

[0004] Summary of the Invention

[0005] Embodiments of the present application provide a method, device, and storage medium for adjusting a natural language sentence.

[0006] In a first aspect, an embodiment of the present invention provides a method for adjusting a natural language sentence. The method comprises:

[0007] Receiving a natural language sentence including a placeholder, wherein the placeholder includes a type attribute, and the placeholder is occupied by a sentence component matching the type attribute;

[0008] Determining a position of the placeholder in the natural language sentence;

[0009] A preposition is added to the natural language sentence based on a type attribute of the placeholder and a position of the placeholder in the natural language sentence.

[0010] Therefore, the embodiments of the present invention can improve the readability and accuracy of natural language sentences by adding prepositions to natural language sentences through the type attributes of placeholders and the positions of placeholders in natural language sentences.

[0011] In one embodiment, adding a preposition to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a first sentence component occupying a subject placeholder in the natural language sentence as the subject in the natural language sentence; determining a second sentence component occupying a predicate placeholder in the natural language sentence as the predicate in the natural language sentence; determining a third sentence component occupying an object placeholder in the natural language sentence as the object in the natural language sentence; when the object is located between the subject and the predicate, adding a first preposition between the object and the subject; when the object is located before the subject and the predicate, adding a second preposition between the object and the subject. It can be seen that different types of prepositions can be added according to the object position, which is more in line with natural language habits.

[0012] In one embodiment, adding a preposition to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a fourth sentence component occupying the complement placeholder in the natural language sentence as a first complement in the natural language sentence, wherein the first complement is determined based on user input; and adding a third preposition before the first complement. It can be seen that a preposition can be added to a complement determined based on user input.

[0013] In one embodiment, adding a preposition to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a fifth sentence component occupying a complement placeholder in the natural language sentence as a second complement in the natural language sentence, where the second complement is determined based on output data of a business operation, wherein the business operation is determined based on a predicate occupying a predicate placeholder in the natural language sentence; and adding a fourth preposition before the second complement. It can be seen that a preposition can be added to a complement determined based on the output data of the business operation.

[0014] In one embodiment, adding a preposition to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining the sixth sentence component occupying the adverbial placeholder in the natural language sentence as an adverbial in the natural language sentence, the adverbial being determined based on input data of a business operation, wherein the business operation is determined based on the predicate occupying the predicate placeholder in the natural language sentence; and adding a fifth preposition before the adverbial.

[0015] It can be seen that prepositions can be added to various types of adverbials, which is more in line with natural language habits.

[0016] In one embodiment, it also includes: moving the placeholder in the natural language sentence based on a user trigger instruction; determining the updated position of the placeholder in the natural language sentence; and updating the preposition in the natural language sentence based on the type attribute of the placeholder and the updated position of the placeholder in the natural language sentence.

[0017] It can be seen that when the placeholders of the natural language sentence are moved, the prepositions are updated, thereby ensuring the readability and accuracy of the sentence.

[0018] In one embodiment, the natural language statement is adapted to describe a workflow, where the workflow represents the execution of business operations by resources in a work unit.

[0019] Therefore, prepositions can be added to natural language sentences describing workflows, thereby improving the execution efficiency of the workflows.

[0020] In one embodiment, it also includes: converting the natural language statement into a low-code representation that describes the workflow; parsing the low-code representation to obtain a workflow represented in the form of a node-link assembly; compiling and downloading the workflow represented in the form of a node-link assembly to the runtime of the main controller of the corresponding work unit to execute the workflow.

[0021] Therefore, converting natural language statements describing workflows into low-code representations that can execute workflows improves workflow processing efficiency.

[0022] In a second aspect, embodiments of the present invention provide an apparatus for adjusting a natural language sentence. The apparatus comprises: a receiving module configured to receive a natural language sentence containing a placeholder, the placeholder containing a type attribute, the placeholder containing a sentence component matching the type attribute; a determining module configured to determine the position of the placeholder in the natural language sentence; and an adding module configured to add a preposition to the natural language sentence based on the type attribute of the placeholder and the position of the placeholder in the natural language sentence.

[0023] In one embodiment, the adding module is used to determine the first sentence component occupying the subject placeholder in the natural language sentence as the subject in the natural language sentence; determine the second sentence component occupying the predicate placeholder in the natural language sentence as the predicate in the natural language sentence; determine the third sentence component occupying the object placeholder in the natural language sentence as the object in the natural language sentence; when the object is located between the subject and the predicate, add a first preposition between the object and the subject; when the object is located before the subject and the predicate, add a second preposition between the object and the subject.

[0024] In one embodiment, the adding module is used to determine the fourth sentence component occupying the complement placeholder in the natural language sentence as the first complement in the natural language sentence, wherein the first complement is determined based on user input; and add a third preposition before the first complement.

[0025] In one embodiment, the adding module is used to determine the fifth sentence component occupying the complement placeholder in the natural language sentence as the second complement in the natural language sentence, wherein the second complement is determined based on the output data of the business operation, wherein the business operation is determined based on the predicate occupying the predicate placeholder in the natural language sentence; and add a fourth preposition before the second complement.

[0026] In one embodiment, the adding module is used to determine the sixth sentence component occupying the adverbial placeholder in the natural language sentence as an adverbial in the natural language sentence, wherein the adverbial is determined based on input data of a business operation, wherein the business operation is determined based on the predicate occupying the predicate placeholder in the natural language sentence; and add a fifth preposition before the adverbial.

[0027] In one embodiment, it also includes an update module for moving the placeholder in the natural language sentence based on a user-triggered instruction; determining the update position of the placeholder in the natural language sentence; and updating the preposition in the natural language sentence based on the type attribute of the placeholder and the update position of the placeholder in the natural language sentence.

[0028] In one embodiment, the natural language statement is adapted to describe a workflow, where the workflow represents the execution of business operations by resources in a work unit.

[0029] In one embodiment, it also includes an execution module for converting the natural language statement into a low-code representation describing the workflow; parsing the low-code representation to obtain the workflow represented in the form of a node link assembly; compiling and downloading the workflow represented in the form of a node link assembly to the runtime of the main controller of the corresponding work unit to execute the workflow.

[0030] In a third aspect, an embodiment of the present invention proposes a device for adjusting a natural language statement, comprising: at least one memory configured to store computer-readable code; and at least one processor configured to call the computer-readable code and execute the steps in any one of the methods for adjusting a natural language statement as described above.

[0031] In a fourth aspect, an embodiment of the present invention proposes a computer-readable medium, characterized in that computer-readable instructions are stored on the computer-readable medium, and when the computer-readable instructions are executed by a processor, the processor executes the steps in the method of adjusting a natural language statement as described in any one of the above.

[0032] In a fifth aspect, an embodiment of the present invention proposes a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, which, when executed, cause at least one processor to perform the steps in the method of adjusting a natural language statement as described in any one of the above. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] FIG1 is an exemplary flowchart of a method for adjusting a natural language sentence provided in an embodiment of the present application.

[0034] Figure 2A exemplarily shows an exemplary schematic diagram of describing the workflow in a low-code architecture provided according to an embodiment of the present application in a codeless manner according to an embodiment of the present application.

[0035] FIG2B is a schematic diagram of interaction based on a language element library provided in an embodiment of the present application.

[0036] FIG2C is a schematic diagram of a universal language word order template of a standardized operating procedure (SOP) provided in an embodiment of the present application.

[0037] FIG. 2D is a schematic diagram of an architecture for automatically adjusting word order according to an embodiment of the present application.

[0038] FIG2E is an exemplary schematic diagram of automatically adjusting word order according to an embodiment of the present application.

[0039] FIG2F is an exemplary schematic diagram of the overall semantic editing process according to an embodiment of the present application.

[0040] FIG3 is a diagram showing an application scenario of the method for adjusting natural language sentences provided in an embodiment of the present application in the field of industrial automation.

[0041] FIG4 is an exemplary structural diagram of an apparatus for adjusting a natural language sentence provided in various embodiments of the present application.

[0042] FIG5 is an exemplary structural diagram of an apparatus for adjusting a natural language sentence provided in various embodiments of the present application.

[0043] The accompanying drawings are numerals as follows:

[0044]

[0045]

[0046]

[0047] DETAILED DESCRIPTION

[0048] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that discussing these embodiments is merely to enable those skilled in the art to better understand and implement the subject matter described herein, and is not intended to limit the scope of protection, applicability, or examples set forth in the claims. The functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the embodiments of the present application. Various examples may omit, replace, or add various processes or components as needed. For example, the described method may be performed in an order different from the described order, and various steps may be added, omitted, or combined. In addition, the features described relative to some examples may also be combined in other examples.

[0049] As used herein, the term "including" and its variations are open terms meaning "including but not limited to". The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other definitions may be included below, whether explicit or implicit. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.

[0050] Currently, there are already processing methods that use artificial intelligence methods such as machine learning or deep learning to generate natural language sentences. Applicants have found that artificial intelligence generation methods require a large amount of computing resources and are highly complex to operate, making them often unsuitable for application scenarios that are sensitive to computing resources and operational complexity (such as industrial sites). In addition, how to ensure the readability and accuracy of natural language sentences without significantly occupying computing resources is also a difficult problem.

[0051] An embodiment of the present invention provides a method for adjusting a natural language sentence by automatically adding prepositions to a natural language sentence determined based on a placeholder filling operation, so as to improve the readability and accuracy of the natural language sentence.

[0052] In grammar, "prepositions" are words or affixes used to express a word's grammatical function. They are generally used before pronouns or noun phrases, forming prepositional structures with these words to indicate place, time, state, method, reason, purpose, or an object of comparison.

[0053] For example, prepositions can include: (1) expressing time and place: from, since, since, to, to, to, in, when, toward, along, along, with, etc.; (2) expressing method: according to, according to, in accordance with, in accordance with, based on, through, according to, with, by, etc.; (3) expressing purpose: for, for the sake of, for the sake of, etc.; (4) expressing cause: because, due to, because, only, etc.; (5) expressing object and content: to, for, for, put, to, with, with, give, about, etc.; (6) expressing exclusion: except, except, remove, unless, etc.; (7) expressing passive: be, call, let, give, make, etc.; (8) expressing comparison: than, and, with, as, same, etc.; (9) expressing identity: as, etc.

[0054] FIG1 is an exemplary flow chart of a method for adjusting a natural language sentence provided in an embodiment of the present application. As shown in FIG1 , the method 100 includes:

[0055] Step 101: Receive or obtain a natural language sentence containing a placeholder, where the placeholder contains a type attribute and the placeholder contains a sentence component that matches the type attribute.

[0056] Step 102: Determine the position of the placeholder in the natural language sentence.

[0057] Step 103: Add a preposition to the natural language sentence based on the type attribute of the placeholder and the position of the placeholder in the natural language sentence.

[0058] In one embodiment, the receiving or obtaining of a natural language sentence containing a placeholder in step 101 may be the receiving or obtaining of a natural language sentence, a natural language sentence, or a natural language sentence at the chapter level, for example, input through a natural language compilation tool. Preferably, the natural language compilation tool may provide an artificial interaction interface containing a plurality of placeholders. The natural language compilation tool may receive a user drag operation via the artificial interaction interface to select a placeholder corresponding to a sentence component and move the placeholder to a position in the natural language sentence. Furthermore, the natural language compilation tool may also select from a vocabulary or directly provide user input via the artificial interaction interface to determine the corresponding sentence component occupying the placeholder.

[0059] In one embodiment, receiving a natural language sentence containing a placeholder in step 101 may further include: receiving a natural language sentence containing a placeholder that is generated based on a deep learning algorithm from an artificial neural network.

[0060] The above exemplary description is a specific implementation method of receiving a natural language statement containing placeholders. Those skilled in the art will appreciate that this description is merely exemplary and is not intended to limit the scope of protection of the implementation methods of the present invention.

[0061] In one embodiment, step 103 specifically includes: determining the first sentence element that occupies the subject placeholder in the natural language sentence as the subject in the natural language sentence; determining the second sentence element that occupies the predicate placeholder in the natural language sentence as the predicate in the natural language sentence; and determining the third sentence element that occupies the object placeholder in the natural language sentence as the object in the natural language sentence.

[0062] When the object is located between the subject and the predicate, add a first preposition corresponding to the active voice (e.g., "ba") between the object and the subject; when the object is located before the subject and the predicate, add a second preposition corresponding to the passive voice (e.g., "bei") between the object and the subject.

[0063] In one embodiment, step 103 specifically includes: determining the fourth sentence element that occupies the complement placeholder in the natural language sentence as the first complement in the natural language sentence, where the first complement is determined based on the user input; and adding a third preposition (e.g., "cong" or "dao") before the first complement.

[0064] In one embodiment, step 103 specifically includes: determining the fifth sentence element that occupies the complement placeholder in the natural language sentence as the second complement in the natural language sentence, where the second complement is determined based on the output data of the business operation, and the business operation is determined based on the predicate that occupies the predicate placeholder in the natural language sentence; and adding a fourth preposition (e.g., "cong" or "dao") before the second complement.

[0065] Wherein, when the first complement is the starting object of the business operation, the third preposition is a preposition adapted to the starting object (e.g., "cong"); wherein, when the first complement is the ending object of the business operation, the third preposition is a preposition adapted to the ending object (e.g., "dao").

[0066] In one embodiment, step 103 specifically includes: determining the sixth sentence element that occupies the adverbial placeholder in the natural language sentence as the adverbial in the natural language sentence, where the adverbial is determined based on the input data of the business operation, and the business operation is determined based on the predicate that occupies the predicate placeholder in the natural language sentence; and adding a fifth preposition (e.g., "yi") before the adverbial.

[0067] Preferably, receive a change instruction for changing the automatically generated preposition (e.g., a touch instruction for the automatically generated preposition in the interface), display a preposition library in response to the change instruction, so that the user can select a changed preposition to replace the automatically generated preposition, and use the changed preposition to replace the automatically generated preposition. It can be seen that the automatically generated preposition can be modified based on the user instruction, thereby further improving the readability.

[0068] In one embodiment, in one embodiment, the method 100 further includes: moving a placeholder in a natural language sentence based on a user-triggered instruction; determining an updated position of the placeholder in the natural language sentence; and updating a preposition in the natural language sentence based on a type attribute of the placeholder and an updated position of the placeholder in the natural language sentence.

[0069] In one embodiment, the method 100 further includes: adapting the natural language statement to describe one or more workflows, where the workflows represent business operations performed by resources in a work cell. In one embodiment, the method 100 further includes: converting the natural language statement to a low-code representation describing the workflow; parsing the low-code representation to obtain a workflow represented in a node-link assembly format; and compiling and downloading the workflow represented in the node-link assembly format to a runtime of a main controller of the corresponding work cell to execute the workflow.

[0070] In an embodiment of the present invention, a method is also provided for describing a workflow (such as an Information Technology (IT) / Operation Technology (OT) process) as a natural language statement using semantic language elements, which can come from a predetermined wording library. Using the natural language statement generation method of the embodiment of the present invention, it is possible to input semantic standardized operating procedures (SOPs) or more general local languages ​​into the low-code platform, and ultimately execute the corresponding low-code workflow at runtime. Accordingly, the embodiment of the present invention expands the definition of semantic language elements and provides support for low-code necessary components such as behavior tree logic, semantic expressions, exceptions, key points, annotations, drawings, videos, and index tags. Therefore, two-way conversion between semantic codeless and low-code (such as function block type diagrams (FBTDs) and IoT behavior trees) becomes possible. An embodiment of the present application provides a method for generating a natural language statement that describes a workflow. The method for adjusting natural language statements shown in Figure 1 can be applied to the natural language statement generation method proposed in the embodiment of the present application to describe the workflow.

[0071] Specifically, the method for generating a natural language statement describing a workflow includes:

[0072] Step 1: Based on a first selection operation on a language element library, a subject placeholder is determined.

[0073] The language element library contains various types of placeholders. For example, these placeholders are listed as icons in the language element library on the human-computer interaction interface. Each placeholder has a type attribute, and each placeholder is suitable for being occupied by a sentence component that matches that type attribute.

[0074] For example, the sentence components of modern Chinese usually include subject, predicate, object, verb, attributive, adverbial, complement and central word, etc. Therefore, the language element library of Chinese can include: subject placeholder, predicate placeholder, object placeholder, verb placeholder, attributive placeholder, adverbial placeholder, complement placeholder and central word placeholder, etc. Similarly, the sentence components of English sentences usually include subject, predicate, object, predicate, attributive, adverbial, complement and appositive. Correspondingly, the language element library of English can include: subject placeholder, predicate placeholder, object placeholder, predicate placeholder, attributive placeholder, adverbial placeholder, complement placeholder and appositive placeholder, etc. For other languages ​​or local languages, similar placeholders can also be set according to language habits and grammar.

[0075] In specific applications, the user may first select a subject placeholder from a language element library through, for example, a human-computer interaction interface, and drag the subject placeholder to a natural language sentence editing interface to determine the subject placeholder.

[0076] Step 2: Determine the subject occupying the subject placeholder from the subject vocabulary associated with the subject placeholder, where the subject corresponds to the resource.

[0077] For example, resources can be resources in the work unit according to the present invention, or resources in the resource library in other types of low-code platforms. Among them: a work unit can be a combination of resources such as a system or equipment that can realize a relatively complete and independent control process and operation. Creating workflows based on work units as the basic unit is more in line with the characteristics of industrial control, which can improve the integration of development and reduce the complexity of development. For example, taking the field of industrial technology as an example, work units can be defined according to actual industrial scenarios. For example: a process can be defined as corresponding to a work unit, or a workstation in a process can be defined as a work unit, or a workstation in a workstation can be defined as corresponding to a work unit, etc. The process flow of different work units is different.

[0078] Considering that business operations may be performed by different subjects, these subjects may be, for example, a specific physical device, a person, or other virtualized noun resources. For the convenience of description, the embodiments of the present invention may collectively refer to these physical devices, personnel, virtualized noun resources, etc. as resources. These resources generally refer to various operating subjects that can execute workflows on site. In specific implementation, the resource as the operating subject can be used as a common configuration parameter of the function block node, and the corresponding resource configuration is performed on the required function block nodes when creating the behavior tree; or, when creating the function block node, the resource as the operating subject is configured for the function block node, so that when creating the behavior tree, there is no need to perform resource configuration on the required function block nodes. Alternatively, in order to facilitate the management of resources, these resources can also be represented in the form of resource nodes, and these resource nodes can be stored in the form of a resource knowledge graph. The resource knowledge graph includes: various resource nodes, and connections representing the relationships between resource nodes.

[0079] Here, the subject vocabulary associated with the subject placeholder can be displayed in a new pop-up window of the natural language sentence editing interface, and the subject occupying the subject placeholder can be determined from the subject vocabulary based on the user's selection, that is, the resource in the work unit can be determined. Optionally, the subject vocabulary can be displayed in the natural language sentence editing interface through a drop-down menu.

[0080] Step 3: Based on the second selection operation on the language element library, determine the predicate placeholder.

[0081] Similarly, users can select a predicate placeholder from the language element library and drag it into the natural language sentence editing interface to confirm the predicate placeholder. Depending on the user's drag position, the predicate placeholder can be dragged behind the subject placeholder or in front of the subject placeholder. When the predicate placeholder is dragged in front of the subject placeholder, it can be automatically adjusted to the back of the subject placeholder to conform to language conventions.

[0082] Step 4: Determine the predicate occupying the predicate placeholder from the predicate vocabulary of the associated subject, where the predicate corresponds to the business operation of the resource.

[0083] Here, a predicate lexicon associated with the subject can be displayed in a new pop-up window within the natural language sentence editing interface. Based on the user's selection, the predicate occupying the predicate placeholder is determined from the predicate lexicon, thereby determining the business operation that the resource can perform. Alternatively, the predicate lexicon can be displayed via a drop-down menu within the natural language sentence editing interface.

[0084] Step 5: Generate a natural language statement based on the occupied subject placeholder and the occupied predicate placeholder, wherein the natural language statement is adapted to be converted into a low-code representation describing a workflow, wherein the workflow represents a resource performing a business operation.

[0085] Preferably, in the generated natural language sentence, various types of placeholders have no visual effect, and only the sentence components occupying the placeholders are displayed at the corresponding positions of the placeholders.

[0086] It can be seen that the generated natural language statements indicate that resources perform business operations, and therefore can be converted into low-code representations that describe workflows. Therefore, based on operations on placeholders and thesaurus, the embodiments of the present invention can conveniently use semantic language elements to describe workflows as natural language statements. People who do not have programming knowledge can use natural language statements to conveniently describe workflows, reducing the difficulty of implementing workflows. Moreover, natural language statements can be converted into low-code representations that can be recognized by the underlying devices, further enriching the implementation methods of workflows.

[0087] In one embodiment, the method for generating a natural language statement describing a workflow further includes at least one of the following: (1) determining an object placeholder based on a third selection operation on a language element library; determining an object occupying the object placeholder from a bill of materials of an associated business operation, wherein the object serves as an execution target of the business operation; (2) determining an adverbial placeholder based on a fourth selection operation on a language element library; determining an adverbial occupying the adverbial placeholder based on input data of the business operation; (3) determining a complement placeholder based on a fifth selection operation on a language element library; determining a complement occupying the complement placeholder from a bill of materials of an associated business operation, wherein the complement serves as an execution target of the business operation. (4) Based on the sixth selection operation for the language element library, determine the attributive placeholder; determine the attributive occupying the attributive placeholder from the user input or the bill of materials of the associated business operation, wherein the attributive serves as a limiting description of the subject or object; (5) Based on the seventh selection operation for the language element library, determine the comment placeholder; determine the comment occupying the comment placeholder from the user input; (6) Based on the eighth selection operation for the language element library, determine the figure placeholder; determine the figure occupying the figure placeholder from the user input; (7) Based on the ninth selection operation for the language element library, determine the video placeholder; determine the video occupying the video placeholder from the user input.

[0088] In one embodiment, the method for generating a natural language statement describing a workflow further includes: determining a logical placeholder and a semantic expression placeholder based on a tenth selection operation on a language element library; determining a logical keyword occupying a logical placeholder and a semantic expression occupying a semantic expression placeholder from user input; determining a logical execution branch based on the logical keyword and the semantic expression; and determining a natural language statement corresponding to each logical execution branch. For example, the logical keyword can be a logical keyword in a conditional judgment (If-Then-Else), or a compound logic (such as Switch-Case-Default, Fallback, or Guard). Calculate the logical value (usually true or false) corresponding to the semantic expression, and use the logic determined by the logical keyword to select a pre-set logical execution branch corresponding to the logical value.

[0089] In one embodiment, the method for generating a natural language statement describing a workflow further includes generating a label for the natural language statement based on the execution order of the natural language statement. In this embodiment of the present invention, the label can be used to represent the sequence number of the natural language statement. For example, the label can be displayed at the beginning or end of the natural language statement, etc., to identify the execution order of the natural language statement.

[0090] In one embodiment, the method for generating a natural language statement describing a workflow further includes: determining an exception placeholder based on an eleventh selection operation on a language element library; determining a label corresponding to the exception placeholder from user input; selecting an exception type from an exception library corresponding to the exception placeholder; determining an exception execution branch when the exception type occurs during the execution of the natural language statement of the label; and determining a natural language statement corresponding to the exception execution branch. For example, the exception types include overheating and overvoltage. Accordingly, the exception execution branch includes an exception handling process for overheating and an exception handling process for overvoltage.

[0091] In one embodiment, the method for generating a natural language statement describing a workflow also includes: determining a key point placeholder based on a twelfth selection operation on a language element library; determining a key point occupying the key point placeholder from user input; wherein the low-code representation includes a control corresponding to the key point, wherein when the control is triggered, the next key point of the key point in the workflow is executed.

[0092] Therefore, the embodiments of the present invention also expand the definition of semantic elements to provide support for low-code necessary components such as behavior tree logic, semantic expressions, exceptions, key points, annotations, illustrations, videos, and indexes.

[0093] In one embodiment, the method for generating a natural language statement describing a workflow further includes: receiving a change request for an occupied subject placeholder in the natural language statement; based on the change request, displaying a subject vocabulary, in particular automatically displaying the subject vocabulary; a user can thereby determine an updated subject occupying the subject placeholder from the subject vocabulary, wherein the updated subject corresponds to an updated resource; displaying (e.g., automatically displaying) a predicate vocabulary associated with the updated subject; determining an updated predicate occupying the predicate placeholder from the predicate vocabulary associated with the updated subject (e.g., the user selects an updated predicate from the predicate vocabulary associated with the updated subject), wherein the updated predicate corresponds to a business operation of the updated resource; and updating (e.g., automatically updating) the natural language statement based on the updated occupied subject placeholder and the updated occupied predicate placeholder. It can be seen that in the embodiments of the present invention, the subject can be conveniently changed to change the resources in the workflow.

[0094] In one embodiment, the method for generating a natural language statement describing a workflow further includes: receiving a change request for an occupied predicate placeholder in the natural language statement; based on the change request, displaying (e.g., automatically displaying) a predicate vocabulary associated with the subject; determining from the predicate vocabulary an updated predicate that updates the predicate placeholder (e.g., a user selects an updated predicate from the predicate vocabulary), the updated predicate corresponding to the updated business operation of the resource; and updating (e.g., automatically updating) the natural language statement based on the occupied subject placeholder and the updated predicate placeholder. It can be seen that in the embodiments of the present invention, the predicate can be conveniently changed to change the business operation in the workflow.

[0095] In addition, the embodiment of the present application also provides a method for converting natural language statements. The natural language statement determined based on the above method can be converted into a function block type diagram (FBTD). The conversion method includes:

[0096] Step 1: Determine a first mapping relationship between a subject in a natural language sentence and a function block header of a function block, wherein the subject corresponds to a resource in a work unit.

[0097] Step 2: Determine a second mapping relationship between a predicate in the natural language sentence and a function block name of the function block, wherein the predicate corresponds to a business operation of the resource.

[0098] Step 3: Based on the first mapping relationship and the second mapping relationship, convert the natural language statement into a function block, or convert the function block into a natural language statement, wherein the function block is presented as a function block type diagram, and the function block is adapted to describe the workflow, and the workflow represents the resource execution business operation.

[0099] The following uses natural language statements in a low-code architecture as an example to illustrate the process of adjusting natural language statements in an implementation manner of the present invention.

[0100] Figure 2A exemplarily shows an exemplary schematic diagram of a workflow described in a low-code architecture provided according to an embodiment of the present application in a codeless manner according to an embodiment of the present application. In this architecture, all exchanged artifacts use a standardized universal runtime engineering exchange format, and the metadata of the universal runtime engineering exchange format is easy to track and manage.

[0101] The general runtime engineering exchange model 304 includes a low-code platform logic library 307 (which can be, for example, a behavior tree logic library), a resource library 308, a function block library 309, a custom vocabulary library 310, a bill of materials (BOM) 311, a general language extension vocabulary library 312, and a key point library 313. The logic library 307 provides logic for occupying logic placeholders 405, semantic expressions for occupying semantic expression placeholders 407, and exception types for occupying exception placeholders 408. The key point library 313 provides key points for occupying key point placeholders 409. The resource library 308 provides resources for occupying subject placeholders 401. The function block library 309 provides business operations for occupying predicate placeholders 402 and provides input data for business operations for occupying adverbial placeholders 403. The bill of materials 311 provides objects for occupying object placeholder 404, attributives for occupying attributive placeholder 412, and complements for occupying complement placeholder 413. The universal language extension vocabulary 312 provides prepositions that are automatically inserted into natural language sentences.

[0102] By using the codeless universal language editor 302 of the embodiment of the present application that implements the above-mentioned method of generating and adjusting natural language statements, natural language statements can be generated and edited. The codeless semantic SOP editor can also be used to generate SOPs in natural language form. Moreover, the generated natural language statements (including SOPs) can be converted into low-code behavior trees / FBTD305, wherein the low-code behavior trees present function block nodes in the form of label graphs; the low-code FBTD presents function block nodes in the form of type graphs. Then, the interpreter-driven runtime 306 can be used to parse the low-code represented behavior tree / FBTD305 to obtain a workflow represented in the form of a node link assembly, and the workflow represented in the node link assembly form is compiled and downloaded to the runtime of the main controller of the corresponding work unit to execute the workflow. For example, the behavior tree / FBTD305 can be stored in a markup language such as Extensible Markup Language (XML), and can be verified by an XML Schema (XSD) prototype to verify that the XML format of the behavior tree / FBTD305 is correct. After the interpreter-driven runtime 306 parses the behavior tree / FBTD 305, a workflow represented in the form of a node-link assembly can be obtained. The workflow is then compiled and downloaded to the runtime of the main controller of the corresponding work unit to execute the workflow. The embodiment of the present invention also proposes a natural language statement conversion method, which can convert a natural language statement determined based on the above method (for example, a natural language statement generated without adding prepositions, or a natural language statement with adding prepositions) into an FBTD. The method includes: step (1): determining a first mapping relationship between a subject in the natural language statement and a function block header of a function block, wherein the subject corresponds to a resource; step (2): determining a second mapping relationship between a predicate in the natural language statement and a function block name of the function block, wherein the predicate corresponds to a business operation of the resource; step (3): based on the first mapping relationship and the second mapping relationship, converting the natural language statement into a function block, or converting the function block into a natural language statement, wherein the function block is presented as a function block type diagram, the function block is adapted to describe the workflow, and the workflow represents the resource performing the business operation. It can be seen that the presence of prepositions is ignored during the conversion process.

[0103] The above describes the specific process of converting a natural language statement into an FBTD. Those skilled in the art will appreciate that this is merely illustrative and does not limit the scope of the present invention. Furthermore, after converting a natural language statement into an FBTD, the FBTD can be further converted into a behavior tree, which is not a limitation of the present invention.

[0104] The OT domain generally refers to operational technology (OT), which combines hardware and software to detect or trigger changes in enterprise processes or events by directly monitoring and / or controlling physical devices (referred to as OT devices). OT uses computers to monitor or change the physical state of systems such as industrial control systems (ICS). ICS are computer-based facilities, systems, and equipment used to remotely monitor and / or control critical industrial processes and implement physical functions. The term "OT" is used to distinguish ICS from traditional information technology (IT) systems in terms of technical implementation and functionality. Currently, there are many IT low-code development tools or platforms on the market. Some of these tools are targeted at IoT use cases and are aimed at experienced IT engineers, while OT engineers and junior IT engineers find their paradigms difficult to understand. Some tools are more suitable for low-code development use cases in the IT domain and are not well suited for the OT domain. The natural language statement generation method for describing workflows described in this embodiment can be used in the OT domain as a code-free development method for the OT domain. Accordingly, the workflow can be an OT domain workflow; the work unit can be a work unit within the OT domain; and OT devices can include but are not limited to: Internet of Things (IoT) devices, Programmable Logic Controller (PLC), robots (Robotics), manual processes (Manual Process), Industrial Personal Computers (IPC), etc.

[0105] In addition, in the embodiments of the present application, the integration of IT and OT domains is becoming increasingly important in the process of digital transformation of enterprises. In order to integrate the IT and OT domains into an ITOT system, a pressing issue is how enterprises can use an easy-to-understand method, rather than IT domain programming, to collect OT domain data and control OT domain processes. Therefore, the above-mentioned natural language statement generation method for describing workflows in this embodiment can also be used in ITOT systems as a code-free development method for the OT domain that can be integrated with the IT domain.

[0106] FIG2B is a schematic diagram of interaction based on a language element library provided in an embodiment of the present application.

[0107] In Figure 2B, a language element library 400 is shown. The language element library 400 includes a subject placeholder 401, a predicate placeholder 402, an adverbial placeholder 403, an object placeholder 404, a logic placeholder 405, an annotation placeholder 406, a semantic expression placeholder 407, an exception placeholder 408, a key point placeholder 409, an illustration placeholder 410, a video placeholder 411, an attributive placeholder 412, and a complement placeholder 413. The interactive process also includes an automatic tag generation process 415 and an automatic preposition generation process 416. The automatic preposition generation process 416 can generate prepositions for natural language sentences to improve readability. The automatic tag generation process 415 automatically generates tags 417 for natural language sentences based on the execution order of the natural language sentences. In this embodiment, the tags 417 are serial number tags.

[0108] The user drags any placeholder from the language element library 400 into the natural language sentence editing interface. As shown in Figure 2B, the user first drags in the subject placeholder 401, and a natural language sentence label 417 is automatically generated. At this point, a subject vocabulary 418 can be automatically displayed or triggered by the user, allowing the user to select a subject from the subject vocabulary 418 to occupy subject placeholder 401. Assuming the user selects "Robot 3," "Robot 3" occupies subject placeholder 401, resulting in a natural language sentence 419 after the subject is determined. The user then drags the predicate placeholder 402 from the language element library 400 into the natural language sentence 419 after the subject is determined, resulting in a natural language sentence 420 after the predicate placeholder is dragged in. The predicate vocabulary 421 associated with "Robot 3" (i.e., the business operations that "Robot 3" can perform) is displayed, allowing the user to select a predicate from the predicate vocabulary 421 to occupy predicate placeholder 402. Assuming that the user selects “linear movement”, “linear movement” occupies the predicate placeholder 402, and a natural language sentence 422 after the predicate is determined is obtained: “Robot 3 moves linearly”.

[0109] At this point, the user can click on "Robot 3" to display the subject vocabulary 418 again, thereby facilitating the user to change the subject. Accordingly, the user can click on "Linear Move" to display the predicate vocabulary 421 again, thereby facilitating the user to change the predicate.

[0110] A universal language word order template for SOP can be established based on an embodiment of the present invention. Figure 2C is a schematic diagram of a universal language word order template for SOP provided in an embodiment of the present application. The template 431 includes a plurality of natural language statements determined based on the interactive process shown in Figure 2B, and each natural language statement has a label to distinguish the respective execution order. Natural language statements containing all execution orders can be combined into a complete SOP. In Figure 2C, label E1 represents exception handling. The exception handling is used to automatically perform processing on exceptions in the execution process of the natural language statement corresponding to label 2. The exception handling process includes a natural language statement labeled E1.1 and a natural language statement labeled E1.2.

[0111] Fig. 2 D is the framework diagram of the automatic generation of prepositions of the present application embodiment. In Fig. 2 D, the process of automatically generating prepositions is described with SOP template 431 as an example. Language specific grammar 436 determines to adopt the Chinese semantic vocabulary 437 comprising Chinese prepositions (such as, when, from, to, f is, put, for, in, use, to, by, etc.) or the English semantic vocabulary 438 comprising English prepositions (such as, from, in, at, for, on, into, by, when, etc.). Rule-based link engine 432 parses SOP template 431. Link engine 432 automatically analyzes the placeholders at different positions in SOP template 431 to automatically generate prepositions 433 contained in the determined vocabulary (Chinese semantic vocabulary 437 or English semantic vocabulary 438). Preposition 433 includes preposition 434 and post-axis preposition 435. Among them, when the link engine 432 analyzes the complement, the preposition-complement structure can be adopted to generate a preposition before the complement, such as "to the testing table". When the link engine 432 analyzes the adverbial, the prepositional structure can be adopted to generate a preposition before the adverbial, such as "with 450N torque". When the link engine 432 analyzes the object, the preposition-object structure can be adopted to generate a preposition before the object, such as "the circuit board". When the link engine 432 analyzes the object preposition (for example, the user drags the object placeholder to the beginning of the sentence), the object-preposition structure can be adopted to generate a preposition after the object, such as "the circuit board was".

[0112] Figure 2E is an exemplary schematic diagram of the automatic generation of prepositions in an embodiment of the present application. In Figure 2E, for the first natural language sentence with a label of 1.1, the occupation operation of the placeholder can be obtained: "Employee torque wrench 450 torque tightens the screw circuit board". By analyzing the type and position of the placeholder, the preposition "with" can be automatically generated between "employee" and "torque wrench", the preposition "with" can be automatically generated between "torque wrench" and "450 torque", and the preposition "to" can be automatically generated between "screw" and "circuit board". The user can move the placeholder based on personal habits to change the position of the placeholder. Accordingly, the preposition is updated based on the updated position of the placeholder. In Figure 2E, the four natural language sentences with a label of 1.1 have the same meaning and can be converted into the same low-code representation. In certain cases, the process 450 of converting the complement to the subject can be performed. In the process 450 of converting the complement to the subject, when the automation upgrade is completed, the complement can be converted into the subject. For example, when a robot replaces a human, the end effector (e.g., a torque wrench that can perform actions without human assistance) will be the subject of the controller itself and thus called the subject. In this case, the original subject ("Employee 1") and the preposition before the complement (i.e., "with") that is converted into a subject are deleted.

[0113] FIG2F is an exemplary schematic diagram of the overall semantic editing process according to an embodiment of the present application. The overall semantic editing process includes:

[0114] Step 1: Execute the subject placeholder drag-in process 750. Here, drag the subject placeholder 401 from the language element library to the natural language sentence editing interface. Also, generate a tag 415 at a fixed position (e.g., at the beginning of the sentence).

[0115] Step 2: Execute the subject and predicate placeholder drag-in process 751. Here, a subject library containing various resources is displayed, allowing the user to select and drag a subject (resource) from the subject library to occupy the subject placeholder 401. For example, drag "Robot 1" as the subject from the subject library containing a large number of resources. Next, drag the predicate placeholder 402 from the language element library (usually drag it after the subject).

[0116] Step 3: Execute the predicate determination process 752. The predicate library associated with "Robot 1" is displayed. This predicate library contains all the business operations that "Robot 1" can perform. The user selects and drags a business operation from the predicate library associated with "Robot 1" to occupy the predicate placeholder 402. For example, the predicate dragged is "Grab and Drop."

[0117] Step 4: Perform the object placeholder dragging-in and first preposition generation process 753. Among them: Drag the object placeholder 404 from the language element library into the natural language sentence editing interface. Based on the user's dragging operation, the position of the object placeholder 404 may not be fixed. Moreover, depending on the position of the object placeholder 404, prepositions related to the object are automatically generated. At this time, the overall semantics corresponding to each preposition remain the same. For example, when the object placeholder 404 is located behind the subject and the predicate, no preposition is generated; when the object placeholder 404 is located between the subject and the predicate, the preposition "ba" is generated between the object placeholder 404 and the subject; when the object placeholder 404 is located before the subject, the preposition "bei" is generated between the object placeholder 404 and the subject.

[0118] Step 5: Perform the object determination process 754. Among them: The grasping object can be determined as a circuit board based on the bill of materials, and the circuit board is determined as the object filling the object placeholder 404.

[0119] Step 6: Perform the adverbial placeholder dragging-in, adverbial determination, and second preposition generation process 755. Among them: Drag one or more adverbial placeholders from the language element library into the natural language sentence editing interface. Moreover, the adverbials filling the adverbial placeholders can be determined using the input data of the business operation or user input, and prepositions related to the adverbials are generated. For example, assuming that the input data of the business operation "grasp and place" includes two parameters, speed and acceleration, specific values of speed and acceleration can be provided based on user input (assuming the speed is 50 m / s and the acceleration is 120 m / s 2 ), then the adverbials include "at a speed of 50 m / s" and "120 m / s 2 acceleration", and the preposition "at" is generated before each adverbial respectively.

[0120] Step 7: Perform the complement placeholder dragging-in, complement determination, and second preposition generation process 756. Among them: Drag one or more complement placeholders from the language element library into the natural language sentence editing interface (for example, at the end of the sentence). Moreover, the complements filling the complement placeholders can be determined using the output data of the business operation or user input, and prepositions related to the complements are generated. For example, assuming that the user input includes "detection table" as the starting point object of a business operation (such as "grasp and place") and "tray A" as the ending point object, then the complements include "detection table" and "tray A", and the preposition "from" corresponding to the starting point object is generated before "detection table", and the preposition "to" corresponding to the ending point object is generated before "tray A".

[0121] Step 8: Perform the processing of dragging in the attributive placeholder and determining the attributive 757. Specifically: Drag one or more attributive placeholders from the language element library into the natural language statement editing interface (usually drag them before the noun to qualify the noun). Moreover, the attributives for filling the attributive placeholders can be determined by using the bill of materials or user input.

[0122] Step 9: Perform the word order adjustment processing 758. At this time, each placeholder can be dragged, and the automatically generated prepositions can be adjusted based on the updated positions of the placeholders. For example, when the object is preposed to form the passive voice, adding the preposition "bei" makes the sentence smoother.

[0123] Figure 3 is an application scenario diagram in the industrial automation field of the method for adjusting natural language statements provided by the embodiment of the present application.

[0124] In Figure 3, after the user's selection operation, dragging operation, and filling operation on the placeholders in the language element library, the low-code development tool 10 generates a natural language statement describing the OT domain workflow. Moreover, the low-code development tool 10 automatically adds prepositions in the natural language statement based on the type attributes of the placeholders and the positions of the placeholders in the natural language statement, so as to adjust the natural language statement for the user to understand. The OT domain workflow defines the operations to be performed by the production line as a work unit shown on the right side of Figure 3. The low-code development tool 10 converts this natural language statement into a behavior tree corresponding to the OT domain workflow. The behavior tree is published to the runtime 30 so that the production line operations of the work unit can be controlled by the runtime 30; at the same time, corresponding microservices can be generated by the microservice generator 20 based on this behavior tree and registered in the knowledge middleware 200, so that the code development tool 301 in the IT domain can call the corresponding microservices through the knowledge middleware 200.

[0125] The user can select placeholders, drag placeholders, or enter content in the placeholders in the GUI at the lower left corner of Figure 3 to edit the natural language statement. For example: First, obtain the required data (such as workpiece processing parameters) from the database & server through the knowledge middleware 200 to control the operation of the entire work unit. Here, the work unit is a production line, and the production line includes machines, conveyor belts, robotic arms, people, PLCs, AGBs, etc. Specifically, in implementation, the code development tool 301 in the IT domain can also be located on the same hardware device as the low-code development tool 10, such as on the same computer.

[0126] Taking the industrial automation field as an example above, the application scenario of adjusting natural language statements is described示范性. Those skilled in the art can realize that the description here is only exemplary and is not used to limit the protection scope of the embodiments of the present invention.

[0127] Figure 4 is an exemplary structural diagram of an apparatus for adjusting a natural language sentence provided in various embodiments of the present application. The apparatus 700 for adjusting a natural language sentence comprises: a receiving module 701 for receiving a natural language sentence containing a placeholder, the placeholder containing a type attribute, and the placeholder containing a sentence component with a matching type attribute; a determining module 702 for determining the position of the placeholder in the natural language sentence; and an adding module 703 for adding a preposition to the natural language sentence based on the type attribute of the placeholder and the position of the placeholder in the natural language sentence.

[0128] In one embodiment, the adding module 703 is used to determine the first sentence component occupying the subject placeholder in the natural language sentence as the subject in the natural language sentence; determine the second sentence component occupying the predicate placeholder in the natural language sentence as the predicate in the natural language sentence; determine the third sentence component occupying the object placeholder in the natural language sentence as the object in the natural language sentence; when the object is located between the subject and the predicate, add a first preposition between the object and the subject; when the object is located before the subject and the predicate, add a second preposition between the object and the subject.

[0129] In one embodiment, the adding module 703 is used to determine the fourth sentence component occupying the complement placeholder in the natural language sentence as the first complement in the natural language sentence, where the first complement is determined based on user input; and add a third preposition before the first complement.

[0130] In one embodiment, adding module 703 is used to determine the fifth sentence component occupying the complement placeholder in the natural language sentence as the second complement in the natural language sentence, where the second complement is determined based on the output data of the business operation, wherein the business operation is determined based on the predicate occupying the predicate placeholder in the natural language sentence; and add a fourth preposition before the second complement.

[0131] In one embodiment, adding module 703 is used to determine the sixth sentence component occupying the adverbial placeholder in the natural language sentence as an adverbial in the natural language sentence, where the adverbial is determined based on input data of a business operation, wherein the business operation is determined based on the predicate occupying the predicate placeholder in the natural language sentence; and add a fifth preposition before the adverbial.

[0132] In one embodiment, an update module 704 is also included, which is used to move the placeholder in the natural language sentence based on a user-triggered instruction; determine the update position of the placeholder in the natural language sentence; and update the preposition in the natural language sentence based on the type attribute of the placeholder and the update position of the placeholder in the natural language sentence.

[0133] In one embodiment, natural language statements are adapted to describe workflows, which represent the execution of business operations by resources within a work unit. In one embodiment, an execution module 705 is further included, configured to convert natural language statements into a low-code representation describing the workflow; parse the low-code representation to obtain a workflow represented in a node-link assembly format; and compile and download the workflow represented in the node-link assembly format to the runtime of the main controller of the corresponding work unit to execute the workflow.

[0134] Figure 5 is an exemplary structural diagram of an apparatus for adjusting natural language sentences with a memory-processor architecture, as provided in various embodiments of the present application. Apparatus 500 for adjusting natural language sentences includes at least one memory 501 and at least one processor 502. The at least one processor 502 is configured to invoke a computer program stored in the at least one memory 501 to execute the method for adjusting natural language sentences described in the embodiments of the present application.

[0135] Specifically, a system or device equipped with a storage medium can be provided, on which a computer-readable code for realizing the function of any one of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or device is read out and executes the computer-readable code stored in the storage medium. In addition, the operating system etc. operated on the computer can be made to complete part or all of the actual operations by the instruction based on the computer-readable code. The computer-readable code read out from the storage medium can also be written to the memory provided in the expansion board inserted into the computer or to the memory provided in the expansion unit connected to the computer, and then the CPU etc. installed on the expansion board or expansion unit are made to perform part and all of the actual operations based on the instruction of the computer-readable code, thereby realizing the function of any one of the embodiments described above. In this embodiment, the embodiment of the computer-readable medium includes but is not limited to a floppy disk, CD-ROM, magnetic disk, optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), memory chip, ROM, RAM, ASIC, configured processor, all-optical medium, all magnetic tapes or other magnetic media, or any other medium from which a computer processor can read instructions. In addition, various other forms of computer-readable media can transmit or carry instructions to a computer, including routers, private or public networks, or other wired and wireless transmission devices or channels. For example, computer-readable instructions can be downloaded from a server computer or the cloud via a communication network. The instructions can include code in any computer programming language, including C, C++, C++, Visual Basic, Java, and JavaScript.

[0136] It should be noted that not all steps and modules in the above processes and system structure diagrams are required, and certain steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by certain components in multiple independent devices.

[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method (100) for adjusting a natural language sentence, characterized in that: include: Receiving or acquiring a natural language sentence containing a placeholder, wherein the placeholder contains a type attribute, and wherein the placeholder is occupied by a sentence component matching the type attribute (101); Determining the position of the placeholder in the natural language sentence (102); Based on the type attribute of the placeholder and the position of the placeholder in the natural language sentence, a preposition is added to the natural language sentence (103).

2. The method (100) for adjusting a natural language sentence according to claim 1, characterized in that: The adding of a preposition (103) to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a first sentence component occupying a subject placeholder in the natural language sentence as a subject in the natural language sentence; determining a second sentence component occupying a predicate placeholder in the natural language sentence as a predicate in the natural language sentence; determining a third sentence component occupying an object placeholder in the natural language sentence as an object in the natural language sentence; When the object is located between the subject and the predicate, the first preposition is added between the object and the subject; When the object is located before the subject and the predicate, a second preposition is added between the object and the subject.

3. The method (100) for adjusting a natural language sentence according to claim 1 or 2, characterized in that: The adding of a preposition (103) to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a fourth sentence component occupying a complement placeholder in the natural language sentence as a first complement in the natural language sentence, wherein the first complement is determined based on user input; Before the first complement, add the third preposition.

4. The method (100) for adjusting a natural language sentence according to any one of claims 1 to 3, characterized in that: The adding of a preposition (103) to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a fifth sentence component occupying a complement placeholder in the natural language sentence as a second complement in the natural language sentence, wherein the second complement is determined based on output data of a business operation, wherein the business operation is determined based on a predicate occupying a predicate placeholder in the natural language sentence; Before the second complement, add the fourth preposition.

5. The method (100) for adjusting a natural language sentence according to any one of claims 1 to 3, characterized in that: The adding of a preposition (103) to the natural language sentence based on the type of the placeholder and the position of the placeholder in the natural language sentence includes: determining a sixth sentence component occupying an adverbial placeholder in the natural language sentence as an adverbial in the natural language sentence, wherein the adverbial is determined based on input data of a business operation, wherein the business operation is determined based on a predicate occupying a predicate placeholder in the natural language sentence; Before the adverbial clause, add the fifth preposition.

6. The method (100) for adjusting a natural language sentence according to any one of claims 1 to 5, characterized in that: Also includes: Based on a user-triggered instruction, moving the placeholder in the natural language sentence; Determining an updated position of the placeholder in the natural language sentence; Based on the type attribute of the placeholder and the updated position of the placeholder in the natural language sentence, a preposition is updated in the natural language sentence.

7. The method (100) for adjusting a natural language sentence according to any one of claims 1 to 6, characterized in that: The natural language statement is adapted to describe a workflow, where the workflow represents that resources in a work unit perform business operations.

8. The method (100) for adjusting a natural language sentence according to claim 7, characterized in that: Also includes: converting the natural language sentence into a low-code representation describing the workflow; Parsing the low-code representation to obtain a workflow represented as a node-link assembly; The workflow represented in the node link assembly form is compiled and downloaded to the runtime of the main controller of the corresponding working unit to execute the workflow.

9. An apparatus (700) for adjusting a natural language sentence, characterized in that: include: A receiving module (701) is configured to receive a natural language sentence containing a placeholder, wherein the placeholder contains a type attribute, and the placeholder contains a sentence component matching the type attribute; A determination module (702) is configured to determine a position of the placeholder in the natural language sentence; An adding module (703) is used to add a preposition to the natural language sentence based on the type attribute of the placeholder and the position of the placeholder in the natural language sentence.

10. The device (700) for adjusting a natural language sentence according to claim 9, characterized in that: The adding module (703) is used to determine the first sentence component occupying the subject placeholder in the natural language sentence as the subject in the natural language sentence; determine the second sentence component occupying the predicate placeholder in the natural language sentence as the predicate in the natural language sentence; determine the third sentence component occupying the object placeholder in the natural language sentence as the object in the natural language sentence; when the object is located between the subject and the predicate, add a first preposition between the object and the subject; when the object is located before the subject and the predicate, add a second preposition between the object and the subject.

11. The device (700) for adjusting a natural language sentence according to claim 9 or 10, characterized in that: The adding module (703) is used to determine the fourth sentence component occupying the complement placeholder in the natural language sentence as the first complement in the natural language sentence, wherein the first complement is determined based on user input; and add a third preposition before the first complement.

12. The device (700) for adjusting a natural language sentence according to any one of claims 9 to 11, characterized in that: The adding module (703) is used to determine the fifth sentence component occupying the complement placeholder in the natural language sentence as the second complement in the natural language sentence, wherein the second complement is determined based on output data of a business operation, wherein the business operation is determined based on a predicate occupying the predicate placeholder in the natural language sentence; and add a fourth preposition before the second complement.

13. The device (700) for adjusting a natural language sentence according to any one of claims 9 to 12, characterized in that: The adding module (703) is used to determine the sixth sentence component occupying the adverbial placeholder in the natural language sentence as an adverbial in the natural language sentence, wherein the adverbial is determined based on input data of a business operation, wherein the business operation is determined based on a predicate occupying the predicate placeholder in the natural language sentence; and add a fifth preposition before the adverbial.

14. The device (700) for adjusting a natural language sentence according to any one of claims 9 to 13, characterized in that: Also includes: An updating module (704) for moving the placeholder in the natural language sentence based on a user-triggered instruction; Determining an updated position of the placeholder in the natural language sentence; Based on the type attribute of the placeholder and the updated position of the placeholder in the natural language sentence, a preposition is updated in the natural language sentence.

15. The device (700) for adjusting a natural language sentence according to any one of claims 9 to 14, characterized in that: The natural language statement is adapted to describe a workflow, where the workflow represents that resources in a work unit perform business operations.

16. The device (700) for adjusting a natural language sentence according to claim 15, characterized in that: Also includes: an execution module (705) for converting the natural language statement into a low-code representation describing the workflow; Parsing the low-code representation to obtain a workflow represented as a node-link assembly; The workflow represented in the node link assembly form is compiled and downloaded to the runtime of the main controller of the corresponding working unit to execute the workflow.

17. A device (500) for adjusting a natural language sentence, characterized in that: include: at least one memory (501) configured to store computer-readable code; At least one processor (502) is configured to call the computer-readable code to execute the steps of the method (100) for adjusting a natural language sentence according to any one of claims 1 to 8.

18. A computer-readable medium, characterized in that The computer-readable medium stores computer-readable instructions, which, when executed by a processor, cause the processor to perform the steps of the method (100) for adjusting a natural language statement according to any one of claims 1 to 8.

19. A computer program product, characterized in that The computer program product is tangibly stored on a computer-readable medium and includes computer-readable instructions that, when executed, cause at least one processor to perform the steps of the method (100) for adjusting a natural language statement according to any one of claims 1 to 8.