CN115686499A - Method, device, storage medium and electronic equipment for generating request message - Google Patents

Method, device, storage medium and electronic equipment for generating request message Download PDF

Info

Publication number
CN115686499A
CN115686499A CN202211422982.4A CN202211422982A CN115686499A CN 115686499 A CN115686499 A CN 115686499A CN 202211422982 A CN202211422982 A CN 202211422982A CN 115686499 A CN115686499 A CN 115686499A
Authority
CN
China
Prior art keywords
service
determining
service field
node
template
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
CN202211422982.4A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211422982.4A priority Critical patent/CN115686499A/en
Publication of CN115686499A publication Critical patent/CN115686499A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method, a device, a storage medium and electronic equipment for generating a request message. Wherein, the method comprises the following steps: acquiring a target service selected by a target object, and determining a first service field corresponding to the target service; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; and acquiring a second service field corresponding to the second node, and calling a template engine of a preset type to generate message information according to the first service field, the second service field and the original template, wherein the template engine of the preset type is used for referencing an object defined by a code of the preset type according to a template language. The method and the device solve the technical problems that time cost is high, development efficiency is low and server power consumption is high due to the fact that new messages can be generated only by developing configuration when orders are issued for different services in the related technology.

Description

Method, device, storage medium and electronic equipment for generating request message
Technical Field
The present application relates to the field of software development, and in particular, to a method, an apparatus, a storage medium, and an electronic device for generating a request packet.
Background
Order synchronization process is involved in the bottom layer service of the full-channel operation center, and order synchronization messages are different because the service information possibly required by each service order synchronization is different. In the related art, each time different services are placed, new messages can be generated only by developing configuration, so that the time cost is greatly increased, the development efficiency is low, and the occupied power consumption is large.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and electronic equipment for generating a request message, so as to at least solve the technical problems of high time cost, low development efficiency and high power consumption of a server occupied by service due to the fact that new messages can be generated only by developing configuration when ordering different services in the prior art.
According to an aspect of the embodiments of the present application, a method for generating a request packet is provided, including: acquiring a target service selected by a target object, and determining a first service field corresponding to the target service; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; and acquiring a second service field corresponding to the second node, and calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for referencing an object defined by a code of the preset type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
Optionally, invoking a template engine of a predetermined type to generate message information according to the first service field, the second service field, and the original template, including: determining a first service field and a second service field as template languages to be matched; matching the template language to be matched with the original template, and determining a first context corresponding to the first service field and a second context corresponding to the second service field according to the matching result; and generating and calling an object defined by a code of a preset type according to the first context and the second context to generate message information.
Optionally, matching the template language to be matched with the original template includes: calling a tree graph of the hierarchical relationship of the full service field corresponding to the original template; recursively traversing the tree graph by taking the first node as a starting point, and determining the branches of the first node along the depth direction of the tree graph until the branches of the first node are traversed completely; and determining the nodes on all branches of the first node in the traversal result as second nodes having association relation with the first node.
Optionally, recursively traversing the tree-like graph with the first node as a starting point, and determining the branch of the first node along the depth direction of the tree-like graph until the branch of the first node is traversed, including: determining a first branch of a first node along the depth direction of the tree-like graph, and marking fields of the nodes in the first branch in the original template; and jumping out the marked first branch, determining the next branch in a recursive mode, and marking the fields corresponding to the original template of the next branch until the fields corresponding to all nodes in the branch of the first node are marked in the original template.
Optionally, determining a first service field corresponding to the target service includes: under the condition that a plurality of target services are selected in a target object, dividing the target services based on service types, and determining a third service field where the target services of the same type have intersection; determining a fourth service field with difference in the target services of the same type; and generating a first service field according to the third service field and the fourth service field.
Optionally, determining a first service field corresponding to the target service includes: and under the condition that a plurality of target services selected by the target object are determined to be the same service, determining a first service field based on any one of the plurality of target services.
Optionally, determining a first service field corresponding to the target service includes: acquiring a target type corresponding to a target service; analyzing historical services with the same type as the target in the historical data, and determining keywords corresponding to the historical services; and determining the keyword as a first service field corresponding to the target service.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for generating a request packet, including: the first acquisition module is used for acquiring a target service selected by a target object and determining a first service field corresponding to the target service; the determining module is used for determining a first node corresponding to the first service field in the original template and determining a second node having an incidence relation with the first node; and the second acquisition module is used for acquiring a second service field corresponding to the second node and calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for referencing an object defined by a code of the preset type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
According to another aspect of the embodiments of the present application, there is also provided a non-volatile storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute any method for generating a request message.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to any of the methods of generating a request message.
In the embodiment of the application, a mode of marking a required service field by the original of full service information and dynamically generating a request by the mark and a field display rule in an original template is adopted, specifically, a first service field corresponding to a target service is determined by acquiring the target service selected by a target object; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; the method comprises the steps of obtaining a second service field corresponding to a second node, calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for quoting an object defined by codes of the preset type according to a template language, and the original template is at least used for providing a full service field and determining a hierarchical relation among the full service fields, so that the purpose of improving the usability of a system is achieved, the time cost for generating a new message is greatly reduced, the technical effect of reducing the power consumption of a server occupied by the service is achieved, and the technical problems that in the related technology, when ordering is carried out in the face of different services, the time cost is large because the new message can be generated only by developing configuration, the development efficiency is low, and the power consumption of the server occupied by the service is large are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a method for generating a request packet according to an embodiment of the present application;
FIG. 2 is a flow chart of a request message generated based on the Velocity template engine;
FIG. 3 is a partial screenshot of the original template content of a request message generated based on the Velocity template engine according to the present invention;
FIG. 4 is a detailed screenshot of a specific partial code technique in an alternative embodiment of the present application
FIG. 5 is a detailed screenshot of a specific section of code technology in an alternative embodiment of the present application;
fig. 6 is a schematic structural diagram of an apparatus for generating a request message according to an embodiment of the present application;
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
To facilitate a better understanding of the embodiments related to the present application by those skilled in the art, the technical terms or partial terms that may be referred to in the present application are now explained as follows:
velocity is a Java-based template engine (template engine) that allows anyone to simply use the template language (template language) to reference objects defined by Java code, VTL for short. When the Velocity is applied to web development, an interface designer can synchronously develop a web site following the MVC architecture with a java program developer, namely, the page designer can only focus on the display effect of a page, and the java program developer focuses on business logic coding. The Velocity separates java code from the web page, which provides convenience for long-term maintenance of the web site and also provides an optional scheme for us besides JSP and PHP. Velocity's ability is far beyond the web site development field, for example, it can generate SQL and PostScript, XML from templates (templates), it can also be used as a standalone tool to generate source code and reports, or as an integrated component of other systems. Velocity may also provide template service (template service) for the Turbine web development architecture. The manner in which Velocity + Turbine provides a template service allows a web application to be developed in a true MVC model.
In accordance with an embodiment of the present application, there is provided a method for generating a request message, where the steps illustrated in the flowchart of the figure may be executed in a computer system, such as a set of computer-executable instructions, and where a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be executed in an order different than that illustrated or described herein.
Fig. 1 is a method for generating a request message according to an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
step S102, acquiring a target service selected by a target object, and determining a first service field corresponding to the target service;
step S104, determining a first node corresponding to the first service field in the original template, and determining a second node having an association relation with the first node;
and step S106, acquiring a second service field corresponding to the second node, and calling a template engine of a predetermined type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the predetermined type is used for referencing an object defined by a code of the predetermined type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
In the embodiment of the application, a mode of marking a required service field by the original of full service information and dynamically generating a request by the mark and a field display rule in an original template is adopted, specifically, a first service field corresponding to a target service is determined by acquiring the target service selected by a target object; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; the method comprises the steps of obtaining a second service field corresponding to a second node, calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for quoting an object defined by codes of the preset type according to a template language, and the original template is at least used for providing a full service field and determining a hierarchical relation among the full service fields, so that the purpose of improving the usability of a system is achieved, the time cost for generating a new message is greatly reduced, the technical effect of reducing the power consumption of a server occupied by the service is achieved, and the technical problems that in the related technology, when ordering is carried out in the face of different services, the time cost is large because the new message can be generated only by developing configuration, the development efficiency is low, and the power consumption of the server occupied by the service is large are solved.
In some embodiments of the present application, invoking a template engine of a predetermined type to generate message information according to a first service field, a second service field, and an original template may be implemented by the following steps, specifically, determining that the first service field and the second service field are template languages to be matched; matching the template language to be matched with the original template, and determining a first context corresponding to the first service field and a second context corresponding to the second service field according to the matching result; and generating and calling an object defined by a code of a preset type according to the first context and the second context to generate message information.
It should be noted that the template engine of the predetermined type includes, but is not limited to: velocity template engine. It should be further noted that the original template maps the hierarchical relationship of all possible service fields, i.e. the hierarchical relationship between all the service fields, and by matching the fields of the original template, all the fields having related relationships can be found. Since the full traffic field in the original template is mapped with the hierarchical relationship of each traffic field, the original template can be understood as a small database consisting of the full traffic field plus a hierarchical relationship graph (e.g., a tree graph).
In some optional embodiments of the present application, matching the template language to be matched with the original template may also be implemented by the following steps, specifically, a tree diagram of a hierarchical relationship of a full traffic field corresponding to the original template may be called; recursively traversing the tree graph by taking the first node as a starting point, and determining the branches of the first node along the depth direction of the tree graph until the branches of the first node are traversed completely; and determining the nodes on all branches of the first node in the traversal result as second nodes having association relation with the first node. It can be understood that all the second nodes having an association relationship with the first service can be quickly determined through the traversal process, and then the required message information is quickly generated according to the first service and the second service field corresponding to the second node, and all the message information generation requirements can be met through one original template without carrying out system development again aiming at different services.
Specifically, the tree-like graph is recursively traversed by taking the first node as a starting point, the branch of the first node is determined along the depth direction of the tree-like graph until the branch traversal of the first node is completed, the first branch of the first node can be determined along the depth direction of the tree-like graph, and a field of the node in the first branch in the original template is marked; and jumping out the marked first branch, determining the next branch in a recursive mode, and marking the fields corresponding to the original template of the next branch until the fields corresponding to all nodes in the branch of the first node are marked in the original template. Namely, through the relationship between nodes on the tree diagram, the corresponding service field can be marked in the original template, so that the subsequent vector template engine can conveniently and quickly confirm the message information needing to be generated.
In an exemplary embodiment of the application, the first service field corresponding to the target service is determined, and it may also be that, when it is determined that multiple target services are selected from the target object, the target services are divided based on service types, and a third service field where target services of the same type intersect with each other is determined; determining a fourth service field with difference in the target services of the same type; and generating a first service field according to the third service field and the fourth service field. It can be understood that a large number of repeated fields may exist in the service fields between services of the same type, and therefore, the purpose of processing data in batches can be achieved by determining the same fields (i.e., the service fields with intersection) between services of the same type, and the data processing time is saved.
It can be understood that, in the case that a plurality of target services selected by the target object are determined to be the same service, the first service field is determined based on any one of the plurality of target services. It is easy to note that if a plurality of services are the same service, only one of the services needs to be processed through the above flow for generating the message information, and repeated processing is not needed.
In order to facilitate determining a first service field corresponding to a target service, in an embodiment of the present application, a target type corresponding to the target service may be obtained; analyzing historical services with the same type as the target in the historical data, and determining keywords corresponding to the historical services; and determining the keyword as a first service field corresponding to the target service.
Fig. 2 is a flowchart of generating a request message based on a Velocity template engine, and as shown in fig. 2, the flow mainly includes two parts:
s202, based on a total amount of objects with field hierarchy (namely, the hierarchical relationship mapped by each field in the original template), marking the field to be displayed and the father node thereof, the father node of the father node and the like in a recursive mode, and if finding that the father node of the current field is marked, jumping out the current branch;
s204, the request is dynamically generated through the original template and the fields with the display marks.
It should be noted that, marking the father node of the father node may employ a depth traversal of a binary tree, traversing the nodes along the depth of the tree, and searching for branches of the tree as deep as possible. If the edge of the current node is searched, the starting node of the edge of the current node is traced back. This is repeated until all reachable nodes of the source node are discovered. Marking all fields to be displayed, and automatically generating the required request message according to the original template.
FIG. 3 is a diagram of the original template portion Rong Jietu of the request message generated by the Velocity-based template engine of the present invention, and FIGS. 4 and 5 are some detailed technical illustrations.
Fig. 6 is a device for generating a request message according to an embodiment of the present application, and as shown in fig. 6, the device includes:
a first obtaining module 60, configured to obtain a target service selected by a target object, and determine a first service field corresponding to the target service;
a determining module 62, configured to determine a first node corresponding to the first service field in the original template, and determine a second node having an association relationship with the first node;
a second obtaining module 64, configured to obtain a second service field corresponding to the second node, and invoke a template engine of a predetermined type to generate message information according to the first service field, the second service field, and an original template, where the template engine of the predetermined type is used to reference an object defined by a code of the predetermined type according to a template language, and the original template is used to at least provide a full-volume service field and determine a hierarchical relationship between the full-volume service fields.
In the apparatus for generating a request message, the first obtaining module 60 is configured to obtain a target service selected by a target object, and determine a first service field corresponding to the target service; a determining module 62, configured to determine a first node corresponding to the first service field in the original template, and determine a second node having an association relationship with the first node; the second obtaining module 64 is configured to obtain a second service field corresponding to the second node, and invoke a template engine of a predetermined type to generate message information according to the first service field, the second service field, and an original template, where the template engine of the predetermined type is configured to reference an object defined by a code of the predetermined type according to a template language, and the original template is at least configured to provide a full service field and determine a hierarchical relationship between the full service fields, so as to achieve the purpose of improving system availability, thereby achieving the technical effects of greatly reducing the time cost of generating a new message and reducing the power consumption of a server occupied by a service, and further solving the technical problems of higher time cost, low development efficiency, and higher power consumption of the server occupied by the service due to the fact that a new message needs to be generated by development and configuration when ordering different services in the related art.
According to another aspect of the embodiments of the present application, there is also provided a non-volatile storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute any method for generating a request message.
Specifically, the storage medium is used for storing program instructions of the following functions, and the following functions are realized:
acquiring a target service selected by a target object, and determining a first service field corresponding to the target service; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; and acquiring a second service field corresponding to the second node, and calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for referencing an object defined by a code of the preset type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the aforementioned storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the aforementioned.
In an exemplary embodiment of the present application, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the method of generating a request message of any of the above.
Optionally, the computer program may, when executed by a processor, implement the steps of:
acquiring a target service selected by a target object, and determining a first service field corresponding to the target service; determining a first node corresponding to the first service field in the original template, and determining a second node having an incidence relation with the first node; and acquiring a second service field corresponding to the second node, and calling a template engine of a predetermined type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the predetermined type is used for referencing an object defined by a code of the predetermined type according to a template language, and the original template is at least used for providing full-volume service fields and determining the hierarchical relationship among the full-volume service fields.
An embodiment according to the present application provides an electronic device including: 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 any one of the above methods of generating a request message.
Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 701 performs the various methods and processes described above, such as the method of generating a request message. For example, in some embodiments, the method of generating a request message may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When loaded into RAM 703 and executed by the computing unit 701, may perform one or more of the steps of the method of generating a request message described above. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of generating a request message.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for generating a request message, comprising:
acquiring a target service selected by a target object, and determining a first service field corresponding to the target service;
determining a first node corresponding to the first service field in an original template, and determining a second node having an incidence relation with the first node;
and acquiring a second service field corresponding to the second node, and calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for referencing an object defined by a code of a preset type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
2. The method of claim 1, wherein invoking a template engine of a predetermined type to generate message information according to the first service field, the second service field, and an original template comprises:
determining the first service field and the second service field as template languages to be matched;
matching the template language to be matched with the original template, and determining a first context corresponding to the first service field and a second context corresponding to the second service field according to a matching result;
and generating and calling an object defined by a code of a preset type according to the first context and the second context to generate the message information.
3. The method of claim 1, wherein matching the template language to be matched with the original template comprises:
calling a tree graph of the hierarchical relationship of the full service field corresponding to the original template;
recursively traversing the tree-like graph by taking the first node as a starting point, and determining the branches of the first node along the depth direction of the tree-like graph until the branches of the first node are completely traversed;
and determining nodes on all branches of the first node in the traversal result as second nodes having association relation with the first node.
4. The method of claim 3, wherein recursively traversing the tree graph starting from the first node and determining branches of the first node along a depth direction of the tree graph until the branches of the first node are traversed, comprises:
determining a first branch of the first node along the depth direction of the tree-like graph, and marking fields of the nodes in the first branch in an original template;
and jumping out the marked first branch, determining the next branch in a recursive mode, and marking the next branch on the fields corresponding to the original template until the fields corresponding to all nodes in the branch of the first node are marked in the original template.
5. The method of claim 1, wherein determining the first service field corresponding to the target service comprises:
under the condition that a plurality of target services are selected in the target object, dividing the target services based on the service types, and determining a third service field where the target services of the same type have intersection;
determining a fourth service field with difference in the target services of the same type;
and generating the first service field according to the third service field and the fourth service field.
6. The method of claim 1, wherein determining the first service field corresponding to the target service comprises:
and under the condition that a plurality of target services selected by the target object are determined to be the same service, determining the first service field based on any one of the plurality of target services.
7. The method of claim 1, wherein determining the first service field corresponding to the target service comprises:
acquiring a target type corresponding to the target service;
analyzing historical services with the same target type in historical data, and determining keywords corresponding to the historical services;
and determining the keyword as a first service field corresponding to the target service.
8. An apparatus for generating a request message, comprising:
the first acquisition module is used for acquiring a target service selected by a target object and determining a first service field corresponding to the target service;
the determining module is used for determining a first node corresponding to the first service field in an original template and determining a second node having an incidence relation with the first node;
and the second acquisition module is used for acquiring a second service field corresponding to the second node and calling a template engine of a preset type to generate message information according to the first service field, the second service field and an original template, wherein the template engine of the preset type is used for referencing an object defined by a code of a preset type according to a template language, and the original template is at least used for providing a full-volume service field and determining a hierarchical relationship among the full-volume service fields.
9. A non-volatile storage medium, characterized in that the storage medium comprises a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the method for generating a request message according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of generating a request message according to any one of claims 1 to 7.
CN202211422982.4A 2022-11-14 2022-11-14 Method, device, storage medium and electronic equipment for generating request message Pending CN115686499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211422982.4A CN115686499A (en) 2022-11-14 2022-11-14 Method, device, storage medium and electronic equipment for generating request message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211422982.4A CN115686499A (en) 2022-11-14 2022-11-14 Method, device, storage medium and electronic equipment for generating request message

Publications (1)

Publication Number Publication Date
CN115686499A true CN115686499A (en) 2023-02-03

Family

ID=85051378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211422982.4A Pending CN115686499A (en) 2022-11-14 2022-11-14 Method, device, storage medium and electronic equipment for generating request message

Country Status (1)

Country Link
CN (1) CN115686499A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium
CN116663515A (en) * 2023-07-25 2023-08-29 中国人民解放军国防科技大学 Method and device for generating dynamic reporting form

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium
CN116340187B (en) * 2023-05-25 2023-08-15 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium
CN116663515A (en) * 2023-07-25 2023-08-29 中国人民解放军国防科技大学 Method and device for generating dynamic reporting form
CN116663515B (en) * 2023-07-25 2024-01-30 中国人民解放军国防科技大学 Method and device for generating dynamic reporting form

Similar Documents

Publication Publication Date Title
CN115686499A (en) Method, device, storage medium and electronic equipment for generating request message
CN111177231A (en) Report generation method and report generation device
CN110706093A (en) Accounting processing method and device
CN114120414B (en) Image processing method, image processing apparatus, electronic device, and medium
CN114116065A (en) Method and device for acquiring topological graph data object and electronic equipment
CN115761130A (en) Three-dimensional scene rapid construction method and device, electronic equipment and storage medium
CN114064925A (en) Knowledge graph construction method, data query method, device, equipment and medium
CN110928594A (en) Service development method and platform
CN112926008A (en) Method and device for generating form page, electronic equipment and storage medium
CN116302218B (en) Function information adding method, device, equipment and storage medium
EP4155670A1 (en) Intersection vertex height value acquisition method and apparatus, electronic device and storage medium
CN114330718B (en) Method and device for extracting causal relationship and electronic equipment
CN112256254A (en) Method and device for generating layout code
CN113691403B (en) Topology node configuration method, related device and computer program product
CN113688133B (en) Data processing method, system, device, medium and equipment based on compliance calculation
CN115563942A (en) Contract generation method and device, electronic equipment and computer readable medium
CN114546343A (en) Generation method and device of activity page
CN115102948A (en) Automatic downloading method, device and equipment of map tiles and storage medium
EP2851812A1 (en) Exposing relationships between universe objects
CN113760240A (en) Method and device for generating data model
CN105574056A (en) Abnormal problem positioning method and apparatus
CN113590219B (en) Data processing method and device, electronic equipment and storage medium
CN112783943B (en) Stroke relationship extraction method, device, equipment, storage medium and program product
CN114429211A (en) Method, apparatus, device, medium and product for generating information
CN114898060A (en) Method, apparatus, device, medium and product for processing data

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