CN117149165A - Service code generation method, device and server - Google Patents

Service code generation method, device and server Download PDF

Info

Publication number
CN117149165A
CN117149165A CN202311132745.9A CN202311132745A CN117149165A CN 117149165 A CN117149165 A CN 117149165A CN 202311132745 A CN202311132745 A CN 202311132745A CN 117149165 A CN117149165 A CN 117149165A
Authority
CN
China
Prior art keywords
unit
semantic
action
chain
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311132745.9A
Other languages
Chinese (zh)
Inventor
范啸风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311132745.9A priority Critical patent/CN117149165A/en
Publication of CN117149165A publication Critical patent/CN117149165A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the application provides a method, a device and a server for generating service codes, which can be used in the technical field of computers. The method comprises the following steps: acquiring a service demand text; carrying out semantic recognition processing on the service demand text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information; performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions; determining code information corresponding to each unit action, wherein the code information comprises a service identifier for realizing the unit action, data required for realizing the unit action and processing logic for realizing the unit action; and generating an object code corresponding to the service demand text according to the code information corresponding to each unit action, wherein the object code is used for realizing the service demand corresponding to the service demand text. The efficiency of generating the service codes is improved.

Description

Service code generation method, device and server
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a service code generation method, a service code generation device and a service code generation server.
Background
The research and development personnel of the enterprise can design and generate corresponding codes according to the service requirements so as to automate the process of realizing the service requirements, thereby improving the working efficiency.
In the actual application process, after determining the service requirement to be realized, the developer can determine the function and data required by realizing the service requirement according to the service requirement. And determining processing logic for realizing the service requirements according to the functions and the data required for realizing the service requirements. And according to the functions, data and processing logic required by the service requirements, manually writing and generating corresponding target codes, and realizing the service requirements by running the target codes.
In the above process, the corresponding object code is designed manually according to the functions and data required for realizing the service requirement, so that the efficiency of generating the service code is low.
Disclosure of Invention
The embodiment of the application provides a method, a device and a server for generating service codes, which are used for solving the problem of low efficiency of generating the service codes.
In a first aspect, an embodiment of the present application provides a method for generating a service code, including:
acquiring a service demand text;
carrying out semantic recognition processing on the service demand text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information;
Performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions;
determining code information corresponding to each unit action, wherein the code information comprises a service identifier for realizing the unit action, data required for realizing the unit action and processing logic for realizing the unit action;
and generating an object code corresponding to the service demand text according to the code information corresponding to each unit action, wherein the object code is used for realizing the service demand corresponding to the service demand text.
In a second aspect, an embodiment of the present application provides a service code generating apparatus, where the apparatus includes:
the acquisition module is used for acquiring the service demand text;
the first processing module is used for carrying out semantic recognition processing on the business requirement text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information;
the second processing module is used for performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions;
A determining module, configured to determine code information corresponding to each unit action, where the code information includes a service identifier for implementing the unit action, data required for implementing the unit action, and processing logic for implementing the unit action;
the generating module is used for generating an object code corresponding to the service demand text according to the code information corresponding to each unit action, and the object code is used for realizing the service demand corresponding to the service demand text.
In a third aspect, the present application provides a server comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any of the first aspects when executed by a processor.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first aspects.
The method, the device and the server for generating the service codes provided by the embodiment of the application can acquire the service demand text through the server. Carrying out semantic recognition processing on the business demand text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information. And performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions. Code information corresponding to each unit action is determined, and an object code corresponding to the service demand text is generated according to the code information corresponding to each unit action, wherein the object code is used for realizing the service demand corresponding to the service demand text. In the above process, the semantic links are obtained by performing semantic recognition processing on the service demand text through the server. And processing the semantic chain to obtain code information, and automatically generating an object code corresponding to the business demand text according to the code information. Rather than manually writing and generating corresponding object code based on the functions, data and processing logic required by the business needs. The efficiency of generating the service codes is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a flow chart of a method for generating a service code according to an embodiment of the present application;
fig. 3 is a schematic diagram of a process of obtaining a service requirement text according to an embodiment of the present application;
fig. 4 is a flow chart of another method for generating service codes according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a process for determining a semantic chain according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process for determining a motion chain according to an embodiment of the present application;
fig. 7 is a schematic diagram of a process for determining to generate a service code according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an action chain according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a service code generating device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
In the present application, "and/or" is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In this context, the character "/" indicates that the front and rear associated objects are an "or" relationship.
The following at least one (item) or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein each of a, b, c may itself be an element, or may be a collection comprising one or more elements.
The term "at least one" in the present application means one or more. "plurality" means two or more.
In the present disclosure, "exemplary," "in some embodiments," "for example," "in other embodiments," etc. are used to indicate an example, instance, or illustration. Any embodiment or design described herein as "example" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term use of an example is intended to present concepts in a concrete fashion.
It should be noted that, the method and the device for generating the service code of the present application may be used in the computer field, and may also be used in any field other than the computer field, and the application field of the method and the device for generating the service code of the present application is not limited.
In order to facilitate understanding, an application scenario to which the embodiment of the present application is applicable is described below with reference to fig. 1.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. Referring to fig. 1, a terminal device 101 is included. The terminal device 101 may be a computer, and an application program is set in the terminal device 101. The user can write the service code through the application program of the terminal device 101, so that the corresponding service function can be realized through the written service code.
In the actual application process, after determining the service requirement to be realized, the developer can determine the function and data required by realizing the service requirement according to the service requirement. And determining processing logic for realizing the service requirements according to the functions and the data required for realizing the service requirements. And manually writing and generating corresponding target codes according to the functions, data and processing logic required by the service requirements. In the above process, the corresponding object code is designed manually according to the functions and data required for realizing the service requirement, so that the efficiency of generating the service code is low.
In the embodiment of the application, the server is arranged, and the service demand text can be acquired through the server. Carrying out semantic recognition processing on the business demand text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information. And performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions. Code information corresponding to each unit action is determined, and an object code corresponding to the service demand text is generated according to the code information corresponding to each unit action, wherein the object code is used for realizing the service demand corresponding to the service demand text. In the above process, the semantic links are obtained by performing semantic recognition processing on the service demand text through the server. And processing the semantic chain to obtain code information, and automatically generating an object code corresponding to the business demand text according to the code information. Rather than manually writing and generating corresponding object code based on the functions, data and processing logic required by the business needs. The efficiency of generating the service codes is improved.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flow chart of a method for generating a service code according to an embodiment of the present application. Referring to fig. 2, the method may include:
s201, acquiring a service demand text.
The execution body of the embodiment of the application can be a server or a device for generating the service codes arranged in the server. The service code generating device may be implemented by software, or may be implemented by a combination of software and hardware.
The user can input the service requirement text in the terminal equipment or select a file corresponding to the service requirement text, and the terminal equipment responds to the input selection operation of the user to generate the service requirement text. And sending the service requirement text to the server.
Next, a process of acquiring the business requirement text will be described with reference to fig. 3. Fig. 3 is a schematic diagram of a process for obtaining a service requirement text according to an embodiment of the present application. Referring to FIG. 3, interfaces 301-302 are included. Interfaces 301-302 may be processing pages provided for the terminal device. Referring to interface 301, a user may open a processing page through an application program of the terminal device, where the processing page includes drop-down selection menus and text input boxes corresponding to a plurality of files. The user may select a file corresponding to the business requirement text in a drop down selection menu corresponding to the plurality of files, or input the business requirement text in a text input box. Referring to interface 302, the user enters the business requirement text in a text entry box and clicks on the determination. And the terminal equipment responds to the input clicking operation of the user and generates a service demand text. And send the service demand text to the server, the service demand text sent by the server to the terminal device may be specifically as follows:
The customer sends a business transaction request to the business system, the business transaction request indicating 1000 yuan to account a. The business system receives the business transaction request, and audits the transfer request, if the audit is passed, 1000 yuan is transferred to the account A; if the auditing fails, the transaction is exited.
S202, carrying out semantic recognition processing on the service demand text to obtain a semantic chain.
The semantic chain includes a plurality of unit semantic information and a semantic order between the plurality of unit semantic information.
The semantic recognition processing can be performed on the business demand text to obtain a semantic chain by the following modes: carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text, wherein the unit semantic sentences are used for indicating independent semantic information; determining unit semantic information corresponding to each unit semantic sentence to obtain a plurality of unit semantic information; determining the semantic sequence among the plurality of unit semantic information according to the sequence of the plurality of unit semantic sentences in the business requirement text; the determining semantic chain includes a plurality of units of semantic information and a semantic order.
Semantic recognition processing can be performed on the business requirement text through natural language processing (Natural Language Processing, NLP) to obtain a semantic chain.
Multiple clauses may be determined based on punctuation contained in the business need text. And determining whether each clause is a unit semantic statement according to whether each clause contains independent semantic information.
For example, according to the business requirement text shown in the above example, 8 clauses may be determined according to punctuation marks included in the business requirement text. Wherein the clause "client sends a business transaction request to the business system" contains independent semantic information. Thus, the clause "customer sends a business transaction request to the business system" may be determined as a unit semantic statement. The clause "pass if audit" does not contain independent semantic information. Thus, the clause "if audit passed" and clause "then transfer 1000 yuan to account a" needs to be consolidated as a unit semantic statement.
The unit semantic information of the unit semantic sentence can be determined according to whether the unit semantic sentence contains a scholarly word. If the unit semantic statement does not include a scholarword, it may be determined that the unit semantic information includes a predicate word and an object word. If the unit semantic sentence includes a word, it may be determined that the unit semantic information includes a conditional word and a predicate word and an object word corresponding to the conditional word.
For example, from the unit semantic statement "if audit passes, 1000 yuan is transferred to account a" shown in the above example, it can be determined that the unit semantic statement contains a scholarword. Then it may be determined that the unit semantic information includes: and if the audit is passed, transferring accounts.
S203, performing action extraction processing on the semantic chain to obtain an action chain.
The action chain includes a plurality of unit actions and an action sequence between the plurality of unit actions.
In the semantic chain, each unit of semantic information corresponds to one unit of action. The action sequence among a plurality of unit actions in the action chain can be determined according to the sequence of the semantic information of each unit in the semantic chain.
For example, the plurality of unit semantic information included in the semantic chain and the corresponding unit actions thereof may be specifically as shown in table 1:
TABLE 1
Unit semantic information Unit action
Semantic information 1 Unit action 1
Semantic information 2 Unit action 2
Semantic information 3 Unit action 3
Semantic information 4 Unit action 4
Assuming that the order of the plurality of unit semantic information shown in table 1 is semantic information 2, semantic information 3, semantic information 1, and semantic information 4, it is possible to determine that the order of the corresponding plurality of unit actions is unit action 2, unit action 3, unit action 1, and unit action 4. Therefore, the action chain can be specified as unit action 2, unit action 3, unit action 1, and unit action 4.
S204, determining code information corresponding to each unit action.
The code information includes a service identification for implementing the unit action, data required for implementing the unit action, and processing logic for implementing the unit action.
The corresponding services, required data, and processing logic implementing the unit actions may be determined from the unit actions.
For example, according to the unit semantic statement "client sends a service transaction request to the service system" shown in the above example, the corresponding unit action is determined as "apply for service transaction". And according to the unit action, determining the corresponding service as the application to conduct business transaction, and determining the service identifier for realizing the unit action as an identifier A1. And determining the required data as the customer account information according to the unit action, and reading the customer account information by the database. According to the unit action, the processing logic for determining the unit action comprises receiving a service transaction request sent by the terminal equipment and acquiring account information of a client in a database.
S205, generating an object code corresponding to the business requirement text according to the code information corresponding to each unit action.
The object code is used for realizing the business requirement corresponding to the business requirement text.
The target code corresponding to the business requirement text can be generated according to the code information corresponding to each unit action in the following manner: generating subcodes corresponding to the unit actions according to code information corresponding to the unit actions aiming at any one unit action; and combining a plurality of sub-codes corresponding to the unit actions according to the action sequence to obtain the target code.
For example, code information corresponding to each unit action is determined according to the plurality of unit actions shown in table 1, and subcodes corresponding to each unit action are generated according to the plurality of code information as shown in table 2:
TABLE 2
Unit action Subcode
Unit action 1 Subcode 1
Unit action 2 Subcode 2
Unit action 3 Subcode 3
Unit action 4 Subcode 4
The operation sequence is determined as unit operation 2, unit operation 3, unit operation 1 and unit operation 4. It may be determined that the object code includes subcode 2, subcode 3, subcode 1, subcode 4. And the business requirements corresponding to the business requirement text can be realized by running the target code.
The method for generating the service codes acquires the service demand text. And carrying out semantic recognition processing on the service demand text to obtain a semantic chain. And performing action extraction processing on the semantic chain to obtain an action chain. Code information corresponding to each unit action is determined. And generating an object code corresponding to the business requirement text according to the code information corresponding to each unit action. In the above process, the semantic links are obtained by performing semantic recognition processing on the service demand text through the server. And processing the semantic chain to obtain code information, and automatically generating an object code corresponding to the business demand text according to the code information. Rather than manually writing and generating corresponding object code based on the functions, data and processing logic required by the business needs. The efficiency of generating the service codes is improved.
On the basis of any one of the above embodiments, a detailed process of generating a service code will be described below with reference to fig. 4.
Fig. 4 is a flowchart of another service code generation method according to an embodiment of the present application. Referring to fig. 4, the method includes:
s401, acquiring a service demand text.
It should be noted that, the execution process of S401 may refer to S201, which is not described herein.
S402, carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text.
The unit semantic statement is used to indicate independent semantic information.
For example, the business requirement text may specifically be as follows: "client sends a loan application request to business system. The business system receives the business transaction request, and audits the loan application request, if the audit is passed, the business system pays money to the client; if the audit fails, rejecting the loan application request of the client. "semantic analysis processing is performed on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text, which can be specifically shown in table 3:
TABLE 3 Table 3
S403, determining the sentence type of the unit semantic sentence according to any unit semantic sentence.
Statement types are logical types or conditional types.
The logic type is used for indicating the logic sequence and flow steps needed when the unit semantic statement is to realize the business requirement. The condition type is used for indicating that the unit semantic sentence comprises judging logic and flow steps corresponding to each judging result.
For example, from the 4 unit semantic sentences shown in the above table 3, the sentence types of the unit semantic sentences can be determined specifically as shown in table 4:
TABLE 4 Table 4
S404, carrying out vocabulary extraction processing on the unit semantic sentences according to the sentence types of the unit semantic sentences to obtain at least one target vocabulary.
The vocabulary extraction processing can be performed on the unit semantic sentences to obtain at least one target vocabulary by the following modes: if the sentence type is a logic type, extracting predicate vocabulary and object vocabulary from the unit semantic sentence, wherein at least one target vocabulary comprises the predicate vocabulary and the object vocabulary; and if the sentence type is the conditional type, extracting a conditional word and a predicate word and an object word corresponding to the conditional word from the unit semantic sentence, wherein at least one target word comprises the conditional word, the predicate word and the object word.
For example, for the unit semantic sentence 1 shown in the above table 4, it is possible to determine that the sentence type is the logical type, and then predicate words "to", "send" and object words "business system", "loan application request" are extracted from the unit semantic sentence. Accordingly, predicate words "to", "send" and object words "business system", "loan application request" are determined as target words. For the unit semantic sentence 4 shown in the above table 4, it may be determined that the sentence type is a conditional type, and then the conditional word "if a passes, B" and "if a fails, C" are extracted from the unit semantic sentence, and if a passes, the predicate word corresponding to B "is" audit "," cash ", and the object word is" client ". If the conditional word "A fails, the predicate word corresponding to the word C" is "audit", "reject", and the object word is "client".
S405, combining at least one target vocabulary to obtain unit semantic information.
For example, with respect to the unit semantic sentence 1 shown in the above table 4, the target vocabulary may be determined as "to", "send", "business system", "loan application request". And carrying out combination processing on at least one target vocabulary to obtain unit semantic information including 'to', 'business system', 'send', 'loan application request'.
S406, determining the semantic sequence among the plurality of unit semantic information according to the sequence of the plurality of unit semantic sentences in the business requirement text.
For example, as shown in the above example, the order of 4 unit semantic sentences shown in table 4 is determined as unit semantic sentence 1, unit semantic sentence 2, unit semantic sentence 3, and unit semantic sentence 4. The method comprises the steps of determining that unit semantic information corresponding to a unit semantic sentence 1 is unit semantic information 1, unit semantic information corresponding to a unit semantic sentence 2 is unit semantic information 2, unit semantic information corresponding to a unit semantic sentence 3 is unit semantic information 3, and unit semantic information corresponding to a unit semantic sentence 4 is unit semantic information 4. According to the sequence of the plurality of unit semantic sentences in the business requirement text, determining the semantic sequence among the plurality of unit semantic information as unit semantic information 1, unit semantic information 2, unit semantic information 3 and unit semantic information 4.
S407, determining that the semantic chain comprises a plurality of unit semantic information and semantic sequences.
After the semantic strand is determined, a plurality of units of semantic information in the semantic strand can be numbered in sequence, and a numbering rule can be set autonomously. After the plurality of unit semantic information are numbered according to the sequence, the unit semantic information with the abnormality can be rapidly positioned according to the serial numbers after the abnormality occurs in the subsequent design or operation process, so that modification and update can be performed.
Next, a process of determining a semantic chain will be described with reference to fig. 5. Fig. 5 is a schematic diagram of a process for determining a semantic chain according to an embodiment of the present application. Referring to fig. 5, a semantic chain 501 is included. The semantic chain 501 includes a plurality of units of semantic information. The unit semantic information may be unit semantic information corresponding to a unit semantic sentence of a logic type, or may be unit semantic information corresponding to a unit semantic sentence of a conditional type. The number of a unit semantic information can be Yn, and n is a number which is sequentially numbered according to the logic sequence of the business semantics. For the unit semantic information corresponding to the unit semantic sentence of the condition type, the "Yn1n2" number is used. Wherein n1 represents a conditional word, and n2 represents a predicate word and an object word corresponding to the conditional word. The corresponding predicate and object words that branch after the same conditional word are denoted by Yna.
S408, performing action extraction processing on the semantic chain to obtain an action chain.
The action extraction processing can be performed on the semantic chain to obtain an action chain in the following manner: determining unit actions corresponding to each unit semantic information to obtain a plurality of unit actions, wherein the unit actions comprise verb words and noun words, or the unit actions comprise judging conditions; determining an action sequence according to the semantic sequence; the determining action chain includes a plurality of unit actions and an action sequence.
For unit actions corresponding to the logic types, predicate vocabularies can be converted into real verbs and object vocabularies can be converted into nouns. For the unit action corresponding to the condition type, the conditional scholarword is converted into … … if … …, otherwise … … branch conditional word.
After determining the action chain, the unit actions in the action chain may be numbered. The unit actions are numbered in the same manner as the unit semantic information. For example, the unit semantic information may be numbered Y1, and the corresponding action chain may be numbered D1.
Next, a process of determining the action chain will be described with reference to fig. 6. Fig. 6 is a schematic diagram of a process for determining an action chain according to an embodiment of the present application. Referring to FIG. 6, a semantic chain 601 and an action chain 602 are included. The semantic chain 601 is the semantic chain shown in fig. 5. Each unit of semantic information in the semantic chain 601 is determined to correspond to a unit action, and a plurality of unit actions are obtained. The order of actions of the unit actions in action chain 602 is determined according to the semantic order in semantic chain 601. For the unit action Y1 corresponding to the logic type, predicate vocabulary can be converted into real verbs, object vocabulary can be converted into nouns, and the unit action D1 is obtained. For the unit action D2 corresponding to the condition type, the conditional scholarly vocabulary is converted into … … if … …, otherwise … … branch conditional vocabulary. Wherein the number of the branching condition is D12, and the corresponding 2 logical branches are named as D2a and D2b, respectively.
S409, determining code information corresponding to each unit action.
The code information includes a service identification for implementing the unit action, data required for implementing the unit action, and processing logic for implementing the unit action.
For example, the corresponding unit action is determined as "to", "business system", "send", "loan application request", based on the unit semantic sentence shown in table 4. According to the unit action, determining that the service realizing the unit action is creation client application information, and determining that the identification of the creation client application information is identification A3. And determining the data required for realizing the unit action as a client application information table. The processing logic for determining the realization unit action comprises receiving a loan application request sent by the terminal equipment; and writing the information into a client application information table.
S410, generating subcodes corresponding to the unit actions according to code information corresponding to the unit actions for any one unit action.
The subcodes corresponding to the unit actions can be generated according to the code information corresponding to the unit actions by an application program or a preset algorithm.
S411, according to the action sequence, combining a plurality of subcodes corresponding to a plurality of unit actions to obtain an object code.
The object code can be obtained by combining a plurality of subcodes corresponding to a plurality of unit actions according to the action sequence in the following manner: determining an objective function according to the service identification in the code information; determining target data as input information of a target function; determining the sentence type according to the target processing logic, wherein the sentence type is a judgment type or a logic type; and generating subcodes corresponding to the unit actions according to the sentence types, the objective functions and the input information.
The method for generating the service codes acquires the service demand text. And carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text. For any unit semantic sentence, determining the sentence type of the unit semantic sentence. And carrying out vocabulary extraction processing on the unit semantic sentences according to the sentence types of the unit semantic sentences to obtain at least one target vocabulary. The determining semantic chain includes a plurality of units of semantic information and a semantic order. And performing action extraction processing on the semantic chain to obtain an action chain. Code information corresponding to each unit action is determined. For any one unit action, generating a subcode corresponding to the unit action according to code information corresponding to the unit action. And combining a plurality of sub-codes corresponding to the unit actions according to the action sequence to obtain the target code. In the process, unified standards are carried out on each step and the corresponding method in the service code generation process, so that the service code generation process is standardized, and the situation that different research and development personnel generate service codes according to self understanding design is avoided. And semantic recognition processing can be carried out on the service demand text through the server, so that a semantic chain is obtained. And processing the semantic chain to obtain code information, and automatically generating an object code corresponding to the business demand text according to the code information. Rather than manually writing and generating corresponding object code based on the functions, data and processing logic required by the business needs. The efficiency of generating the service codes is improved.
On the basis of any one of the above embodiments, a procedure of generating a service code is illustrated below in conjunction with fig. 7 to 8.
Fig. 7 is a schematic diagram of a process for determining to generate a service code according to an embodiment of the present application. Referring to fig. 7, a terminal device 701 and a server 702 are included. The terminal device 701 may be a mobile phone, a tablet computer, a computer, etc. The server 702 is provided with a processing module and a database. The user may input the service requirement text in the terminal device 701, and the terminal device 701 generates the service requirement text in response to an input selection operation of the user. And sends the business requirement text to the server 702. The business requirement text accepted by the server 702 may be specifically as follows:
the customer applies for opening customer information from the counter, the system accepts the application and carries out validity and legitimacy check on the application information submitted by the customer, if the check passes, the business transaction is continued; if the auditing fails, the transaction is exited. If the customer is an open financial institution customer, high-level teller authorization is required, the authorized passer can create customer information, and other types of customers can directly create customer information.
The server 702 performs semantic analysis processing on the business requirement text to determine a plurality of unit semantic statements in the business requirement text. The plurality of unit semantic sentences may be specifically as shown in table 5:
TABLE 5
The statement type of the server 702 determining each unit semantic statement shown in table 5 may be specifically as shown in table 6:
TABLE 6
The server 702 performs vocabulary extraction processing on the unit semantic sentences according to the sentence types of the unit semantic sentences to obtain at least one target vocabulary. And combining at least one target vocabulary to obtain unit semantic information. The server 702 determines that the semantic chain includes unit semantic information and a semantic order corresponding to each unit semantic statement shown in table 6.
Fig. 8 is a schematic diagram of a motion chain according to an embodiment of the present application. Referring to fig. 8, an action chain 801 is included, the action chain 801 including a plurality of unit actions and an order of actions. The server 702 determines that each unit semantic information corresponds to a unit action, and obtains a plurality of unit actions, where the unit actions include verb vocabulary and noun vocabulary, or the unit actions include judgment conditions. And determines an order of actions based on the semantic order, thereby determining that action chain 801 includes a plurality of unit actions and an order of actions.
The code information corresponding to each unit action in the action chain 801 determined by the server 702 may be specifically as shown in table 7:
TABLE 7
The server 702 generates a subcode corresponding to any one unit operation in the operation chain 801 from the code information shown in table 7. And combining a plurality of sub-codes corresponding to the unit actions according to the action sequence to obtain the target code. The object code may be specifically as follows:
main()
{
Creating client application information (client application information table);
if (audit client application information (client application information table) =true) {
if (identification client type (client application information table) = "financial institution client") {
if (authorized client application information (client application information table) =true) {
Creating client information (client application information table, client information table); }
else{exit()}
}
The server 702 may implement the business requirements corresponding to the business requirement text by running the object code described above.
The method for generating the service codes acquires the service demand text. And carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text. For any unit semantic sentence, determining the sentence type of the unit semantic sentence. And carrying out vocabulary extraction processing on the unit semantic sentences according to the sentence types of the unit semantic sentences to obtain at least one target vocabulary. The determining semantic chain includes a plurality of units of semantic information and a semantic order. And performing action extraction processing on the semantic chain to obtain an action chain. Code information corresponding to each unit action is determined. For any one unit action, generating a subcode corresponding to the unit action according to code information corresponding to the unit action. And combining a plurality of sub-codes corresponding to the unit actions according to the action sequence to obtain the target code. In the process, unified standards are carried out on each step and the corresponding method in the service code generation process, so that the service code generation process is standardized, and the situation that different research and development personnel generate service codes according to self understanding design is avoided. And semantic recognition processing can be carried out on the service demand text through the server, so that a semantic chain is obtained. And processing the semantic chain to obtain code information, and automatically generating an object code corresponding to the business demand text according to the code information. Rather than manually writing and generating corresponding object code based on the functions, data and processing logic required by the business needs. The efficiency of generating the service codes is improved.
Fig. 9 is a schematic structural diagram of a service code generating device according to an embodiment of the present application. Referring to fig. 9, the service code generating apparatus 10 may include:
an acquiring module 11, configured to acquire a service requirement text;
the first processing module 12 is configured to perform semantic recognition processing on the service requirement text to obtain a semantic chain, where the semantic chain includes a plurality of unit semantic information and a semantic sequence between the plurality of unit semantic information;
a second processing module 13, configured to perform an action extraction process on the semantic chain to obtain an action chain, where the action chain includes a plurality of unit actions and an action sequence between the plurality of unit actions;
a determining module 14, configured to determine code information corresponding to each unit action, where the code information includes a service identifier for implementing the unit action, data required for implementing the unit action, and processing logic for implementing the unit action;
the generating module 15 is configured to generate, according to code information corresponding to each unit action, an object code corresponding to the service requirement text, where the object code is used to implement a service requirement corresponding to the service requirement text.
In one possible implementation, the first processing module 12 is specifically configured to:
carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text, wherein the unit semantic sentences are used for indicating independent semantic information;
determining unit semantic information corresponding to each unit semantic sentence to obtain a plurality of unit semantic information;
determining semantic sequences among a plurality of unit semantic information according to the sequence of the plurality of unit semantic sentences in the business requirement text;
determining that the semantic chain includes the plurality of unit semantic information and the semantic order.
In one possible implementation, the first processing module 12 is specifically configured to:
determining the statement type of the unit semantic statement, wherein the statement type is a logic type or a conditional type;
according to the sentence types of the unit semantic sentences, carrying out vocabulary extraction processing on the unit semantic sentences to obtain at least one target vocabulary;
and carrying out combination processing on the at least one target vocabulary to obtain the unit semantic information.
In one possible implementation, the first processing module 12 is specifically configured to:
If the sentence type is the logic type, extracting predicate vocabulary and object vocabulary from the unit semantic sentence, wherein the at least one target vocabulary comprises the predicate vocabulary and the object vocabulary;
and if the sentence type is the condition type, extracting a conditional word and a predicate word and an object word corresponding to the conditional word from the unit semantic sentence, wherein the at least one target word comprises the conditional word, the predicate word and the object word.
In one possible implementation, the second processing module 13 is specifically configured to:
determining unit actions corresponding to each unit semantic information to obtain the plurality of unit actions, wherein the unit actions comprise verb words and noun words, or the unit actions comprise judging conditions;
determining the action sequence according to the semantic sequence;
determining that the action chain includes the plurality of unit actions and the order of actions.
In one possible implementation, the generating module 15 is specifically configured to:
generating subcodes corresponding to any unit action according to code information corresponding to the unit action;
And combining a plurality of subcodes corresponding to the plurality of unit actions according to the action sequence to obtain the target code.
In one possible implementation, the generating module 15 is specifically configured to:
determining an objective function according to the service identification in the code information;
determining the target data as input information of the target function;
determining a statement type according to the target processing logic, wherein the statement type is a judgment type or a logic type;
and generating subcodes corresponding to the unit actions according to the sentence types, the objective functions and the input information.
The service code generating device provided by the embodiment of the application can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and the description is not repeated.
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application. Referring to fig. 10, the server 20 may include: a memory 21, and a processor 22. The memory 21, the processor 22, are illustratively interconnected by a bus 23.
The memory 21 is used for storing program instructions;
the processor 22 is configured to execute the program instructions stored in the memory, so as to cause the server 20 to perform the method shown in the above-described method embodiment.
The server provided by the embodiment of the application can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and are not repeated here.
Embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the above-described method when the computer-executable instructions are executed by a processor.
Embodiments of the present application may also provide a computer program product comprising a computer program which, when executed by a processor, performs the above-described method.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random-access memory (RAM), flash memory, hard disk, solid state disk, magnetic tape, floppy disk, optical disk, and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is also intended to include such modifications and variations.

Claims (10)

1. A method for generating a service code, comprising:
acquiring a service demand text;
carrying out semantic recognition processing on the service demand text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information;
performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions;
Determining code information corresponding to each unit action, wherein the code information comprises a service identifier for realizing the unit action, data required for realizing the unit action and processing logic for realizing the unit action;
and generating an object code corresponding to the service demand text according to the code information corresponding to each unit action, wherein the object code is used for realizing the service demand corresponding to the service demand text.
2. The method of claim 1, wherein performing semantic recognition processing on the business requirement text to obtain a semantic chain comprises:
carrying out semantic analysis processing on the business requirement text to determine a plurality of unit semantic sentences in the business requirement text, wherein the unit semantic sentences are used for indicating independent semantic information;
determining unit semantic information corresponding to each unit semantic sentence to obtain a plurality of unit semantic information;
determining semantic sequences among a plurality of unit semantic information according to the sequence of the plurality of unit semantic sentences in the business requirement text;
determining that the semantic chain includes the plurality of unit semantic information and the semantic order.
3. The method of claim 2, wherein for any one unit semantic statement; determining the unit semantic information corresponding to the unit semantic sentence comprises the following steps:
Determining the statement type of the unit semantic statement, wherein the statement type is a logic type or a conditional type;
according to the sentence types of the unit semantic sentences, carrying out vocabulary extraction processing on the unit semantic sentences to obtain at least one target vocabulary;
and carrying out combination processing on the at least one target vocabulary to obtain the unit semantic information.
4. A method according to claim 3, wherein the vocabulary extracting process is performed on the unit semantic sentences according to the sentence types of the unit semantic sentences to obtain at least one target vocabulary, and the method comprises:
if the sentence type is the logic type, extracting predicate vocabulary and object vocabulary from the unit semantic sentence, wherein the at least one target vocabulary comprises the predicate vocabulary and the object vocabulary;
and if the sentence type is the condition type, extracting a conditional word and a predicate word and an object word corresponding to the conditional word from the unit semantic sentence, wherein the at least one target word comprises the conditional word, the predicate word and the object word.
5. The method according to any one of claims 1-4, wherein performing an action extraction process on the semantic chain to obtain an action chain comprises:
Determining unit actions corresponding to each unit semantic information to obtain the plurality of unit actions, wherein the unit actions comprise verb words and noun words, or the unit actions comprise judging conditions;
determining the action sequence according to the semantic sequence;
determining that the action chain includes the plurality of unit actions and the order of actions.
6. The method according to claims 1-5, wherein generating the object code corresponding to the business requirement text according to the code information corresponding to each unit action comprises:
generating subcodes corresponding to any unit action according to code information corresponding to the unit action;
and combining a plurality of subcodes corresponding to the plurality of unit actions according to the action sequence to obtain the target code.
7. The method of claim 6, wherein generating the subcode corresponding to the unit action based on the code information corresponding to the unit action comprises:
determining an objective function according to the service identification in the code information;
determining the target data as input information of the target function;
Determining a statement type according to the target processing logic, wherein the statement type is a judgment type or a logic type;
and generating subcodes corresponding to the unit actions according to the sentence types, the objective functions and the input information.
8. A service code generating apparatus, the apparatus comprising:
the acquisition module is used for acquiring the service demand text;
the first processing module is used for carrying out semantic recognition processing on the business requirement text to obtain a semantic chain, wherein the semantic chain comprises a plurality of unit semantic information and semantic sequences among the plurality of unit semantic information;
the second processing module is used for performing action extraction processing on the semantic chain to obtain an action chain, wherein the action chain comprises a plurality of unit actions and an action sequence among the plurality of unit actions;
a determining module, configured to determine code information corresponding to each unit action, where the code information includes a service identifier for implementing the unit action, data required for implementing the unit action, and processing logic for implementing the unit action;
the generating module is used for generating an object code corresponding to the service demand text according to the code information corresponding to each unit action, and the object code is used for realizing the service demand corresponding to the service demand text.
9. A server, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are for causing a computer to perform the method of any one of claims 1 to 7.
CN202311132745.9A 2023-09-04 2023-09-04 Service code generation method, device and server Pending CN117149165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311132745.9A CN117149165A (en) 2023-09-04 2023-09-04 Service code generation method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311132745.9A CN117149165A (en) 2023-09-04 2023-09-04 Service code generation method, device and server

Publications (1)

Publication Number Publication Date
CN117149165A true CN117149165A (en) 2023-12-01

Family

ID=88886502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311132745.9A Pending CN117149165A (en) 2023-09-04 2023-09-04 Service code generation method, device and server

Country Status (1)

Country Link
CN (1) CN117149165A (en)

Similar Documents

Publication Publication Date Title
CN110532536B (en) Rule configuration method and device
US20200184957A1 (en) Augmented intent and entity extraction using pattern recognition interstitial regular expressions
US11610271B1 (en) Transaction data processing systems and methods
CN113076410A (en) Abnormal information processing method, device, equipment and storage medium
CN114048129A (en) Automatic testing method, device, equipment and system for software function change
CN105989532A (en) Data processing method and device
CN112966482A (en) Report generation method, device and equipment
CN111400187A (en) Parameter dynamic verification system and method based on customized data source
EP4167122A1 (en) Extracting key value pairs using positional coordinates
CN117149165A (en) Service code generation method, device and server
CN112507725B (en) Static publishing method, device, equipment and storage medium of financial information
CN108376365B (en) Bank number determining method and device
CN113779198A (en) Electronic business card generating method, device, equipment and medium based on artificial intelligence
CN106528631A (en) Processing method and device of beneficiary information of bank inward remittance telegraph text
CN111782792A (en) Method and apparatus for information processing
CN111552779A (en) Man-machine conversation method, device, medium and electronic equipment
CN113159951B (en) Financial data clearing method, device, equipment and storage medium
CN113111155B (en) Information display method, device, equipment and storage medium
US20240126924A1 (en) Entity focused natural language generation
CN117271487A (en) Service data verification method, device, equipment and storage medium
CN115576533A (en) Sas grammar supporting rule engine and configuration system thereof
CN113205421A (en) Accounting method and device for financial products
Alves et al. Building Multilingual Corpora for a Complex Named Entity Recognition and Classification Hierarchy using Wikipedia and DBpedia
Engelbrechtsmüller Fine-Tuning Large Language Models for Ticket Classification at Doka GmbH
Lester et al. Intent Features for Rich Natural Language Understanding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination