Nothing Special   »   [go: up one dir, main page]

CN113392623A - Service data object generation method, generation device, electronic device and storage medium - Google Patents

Service data object generation method, generation device, electronic device and storage medium Download PDF

Info

Publication number
CN113392623A
CN113392623A CN202110674753.0A CN202110674753A CN113392623A CN 113392623 A CN113392623 A CN 113392623A CN 202110674753 A CN202110674753 A CN 202110674753A CN 113392623 A CN113392623 A CN 113392623A
Authority
CN
China
Prior art keywords
attribute information
target
service data
template
present disclosure
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
CN202110674753.0A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110674753.0A priority Critical patent/CN113392623A/en
Publication of CN113392623A publication Critical patent/CN113392623A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (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)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a service data object generation method, which can be applied to the technical field of computers and the technical field of finance. The service data object generation method comprises the following steps: obtaining at least one target structure object by analyzing a target program; analyzing each target structure object to obtain at least one target attribute information of the target structure object; and filling at least one target attribute information into a parameter frame in the service data template to generate a service data object. The disclosure also provides a service data object generating device, an electronic device and a storage medium.

Description

Service data object generation method, generation device, electronic device and storage medium
Technical Field
The present disclosure relates to the field of computer and financial technologies, and more particularly, to a service data object generation method, a service data object generation apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
In the project of the host-under-platform, in order to move the program on the host to the integrated transaction platform, a large amount of communication area structures written in Enterprise Generation Language (EGL) need to be converted into service data objects used by the integrated transaction platform.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: code information is easy to miss when the service data object used by the comprehensive trading platform is compiled, and the manual compiling of the service data object requires certain knowledge of a program language, so that the learning cost is high.
Disclosure of Invention
In view of the above, the present disclosure provides a service data object generation method, a service data object generation apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
One aspect of the present disclosure provides a service data object generation method, including:
obtaining at least one target structure object by analyzing a target program;
analyzing each target structure object to obtain at least one piece of target attribute information of the target structure object; and
and filling the at least one target attribute information into a parameter frame in a service data template to generate the service data object.
According to an embodiment of the present disclosure, the target attribute information includes at least one of the following information: field level, field name, field type, field length, offset of field, number of arrays, weight of associated arrays, previous level field, and next level field.
According to the embodiment of the present disclosure, the service data template includes at least one template attribute information;
wherein, the filling the at least one target attribute information into a parameter frame in a service data template to generate the service data object includes:
acquiring the at least one template attribute information in the service data template;
for each template attribute information, matching the at least one target attribute information with the template attribute information, and determining target attribute information matched with the template attribute information; and
and filling a parameter value corresponding to the target attribute information matched with the template attribute information into the parameter frame corresponding to the template attribute information to obtain the service data object.
According to an embodiment of the present disclosure, the matching the at least one target attribute information with the template attribute information and determining the target attribute information matched with the template attribute information for each piece of the template attribute information includes:
acquiring a relation list, wherein the relation list comprises the corresponding relation between the target attribute information and the template attribute information;
and matching each template attribute information with the at least one target attribute information according to the relation list, and determining the target attribute information matched with the template attribute information.
According to an embodiment of the present disclosure, the target program includes at least one data structure, where each data structure includes a plurality of lines of data definition statements;
wherein, the obtaining at least one target structure object by analyzing the target program includes:
for each data structure body of the target program, analyzing a plurality of lines of data definition sentences of the data structure body by using a strategy chain to obtain a structure type syntax tree;
serializing the plurality of structure type syntax trees to obtain the structure object; and
and determining the at least one target structure object from the structure objects according to the name of the at least one data structure body.
According to an embodiment of the present disclosure, the service data object generation method further includes:
and transmitting the service data object to a comprehensive trading platform.
According to an embodiment of the present disclosure, the analyzing the at least one target structure object to obtain at least one target attribute information of the at least one target structure object includes:
analyzing the target structure object to obtain a target function linked list for each target structure object, wherein the target function linked list comprises a plurality of data fields; and
and acquiring the at least one piece of target attribute information according to the field attributes of the plurality of data fields.
Another aspect of the present disclosure provides a service data object generation apparatus, including:
the first acquisition module is used for acquiring at least one target structure object by analyzing a target program;
a second obtaining module, configured to analyze each target structure object to obtain at least one piece of target attribute information of the target structure object; and
and the filling module is used for filling the parameter frame in the service data template by using the at least one piece of target attribute information so as to generate the service data object.
Another aspect of the present disclosure provides an electronic device including: one or more processors; memory to store one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the technical means that the target program package is analyzed into the structural object, the structural object is analyzed to obtain the attribute information, and the obtained attribute information is filled into the service data template is adopted, so that the technical problems that code information is easy to miss when the service data object used by the comprehensive trading platform is written, and the service data object needs to be manually written and has certain understanding on the program language and the learning cost is high are at least partially overcome, and further, the technical effect that the learning cost is reduced by a method for converting the logical target program into the service data object is achieved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates a code diagram of an EGL communication zone according to an embodiment of the present disclosure;
FIG. 2 schematically shows a code diagram of a service data object according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates an application scenario diagram of a service data object generation method according to an embodiment of the present disclosure;
FIG. 4 schematically shows a flow chart of a service data object generation method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for generating a service data object according to an embodiment of the disclosure;
fig. 6 schematically shows a block diagram of a structure of a service data object generation apparatus according to an embodiment of the present disclosure; and
fig. 7 schematically shows a block diagram of an electronic device adapted to implement the service data object generation method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Fig. 1 schematically shows a code diagram of an EGL communication zone according to an embodiment of the present disclosure.
FIG. 2 schematically shows a code diagram of a service data object according to an embodiment of the disclosure.
The EGL communication area is a data structure used by Enterprise Generation Language (EGL), as shown in FIG. 1.
In the current project of the under-host Platform, a large number of EGL communication zone structures need to be converted into service data objects used by a Comprehensive Transaction Platform (compact Transaction Platform).
The service data object is a data structure used by a platform application, as shown in fig. 2, Record _ a in fig. 2 represents a data structure name, and variable _1, variable _2, and variable _3 are three fields defined in Record _ a. Meanwhile, other structural bodies can be nested in Record _ a, as shown in Sub _ Record _ B.
Currently, the definition of EGL communication area is mainly converted into the definition of service data object by manual method. Because the number of EGL programs on the host computer is large, the used communication area definition is huge, a large amount of manpower investment is needed, and meanwhile, when writing service data objects, a writer needs to know the EGL communication area definition first, so that the writer needs to have additional host computer development knowledge and needs to have certain understanding on the grammar of the host computer.
Therefore, many developers are needed for writing service data objects manually, and the writing learning cost is high.
In view of this, an embodiment of the present disclosure provides a service data object generating method, which includes a process of obtaining at least one target structure object by parsing a target program, a process of parsing each target structure object to obtain at least one target attribute information of the target structure object, and a process of filling the at least one target attribute information into a parameter box in a service data template to generate the service data object.
It should be noted that the service data object generation method and apparatus provided by the present disclosure may be used in the financial field, for example, a bank, or may be used in any field other than the financial field, for example, a hospital.
Fig. 3 schematically shows an application scenario diagram of a service data object generation method according to an embodiment of the present disclosure.
As shown in fig. 3, an application scenario 300 according to this embodiment may include terminal devices 301, 302, 303, a network 304 and a server 305. The network 304 serves as a medium for providing communication links between the terminal devices 301, 302, 303 and the server 305. Network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal device 301, 302, 303 to interact with the server 305 via the network 304 to receive or send messages or the like. The terminal devices 301, 302, 303 may have installed thereon various messenger client applications such as, for example only, a service data object generation application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 301, 302, 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 305 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 301, 302, 303. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (for example, generate a service data object according to the user request, and the like) to the terminal device.
It should be noted that the service data object generation method provided by the embodiments of the present disclosure may be generally executed by the terminal devices 301, 302, and 303. Accordingly, the service data object generating apparatus provided by the embodiments of the present disclosure may be generally disposed in the terminal devices 301, 302, 303. The service data object generation method provided by the embodiment of the present disclosure may also be executed by the server 305. Accordingly, the service data object generation apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 305. The service data object generation method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 305 and is capable of communicating with the terminal devices 301, 302, 303 and/or the server 305. Accordingly, the service data object generating apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 305 and capable of communicating with the terminal devices 301, 302, 303 and/or the server 305.
It should be understood that the number of terminal devices, networks, and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The service data object generation method according to the embodiment of the present disclosure will be described in detail below with reference to fig. 4 to 5 based on the scenario described in fig. 3.
Fig. 4 schematically shows a flow chart of a service data object generation method according to an embodiment of the present disclosure.
As shown in fig. 4, an aspect of the present disclosure provides a service data object generation method, which may include operations S401 to S403.
In operation S401, at least one target structure object is acquired by parsing a target program.
In operation S402, each target structure object is parsed to obtain at least one target attribute information of the target structure object.
In operation S403, at least one target attribute information is populated into a parameter box in the service data template to generate a service data object.
According to an embodiment of the present disclosure, the object program may include a communication area program written in Enterprise Generation Language (EGL). The target structure object may be a Record object, wherein the target structure object stores specific information of each field. Service data objects may include, but are not limited to, xsd files and dataset files.
According to the embodiment of the present disclosure, an xsd file and a dataset file are two files defined by a service data object, wherein the xsd file may include a name of a data structure, a field defined by the data structure, a field type defined by the data structure, and the like, for example, the name of the data structure is Record _ a, the field defined by the data structure is variable _1, and the field type is xs: int, xs: int represents a signed 32-bit integer; the dataset file may include a field name, a name of a data structure, and the like, for example, the field name may be property0, and the name of the data structure may be variable _ 1.
According to an embodiment of the present disclosure, a target structure object may be acquired by serializing a target program. The target structure object is obtained by serializing the data definition statement of each data structure in the target program.
According to the embodiment of the disclosure, the serialized objects such as the target structure object can be data files in the form of binary data, and the target attribute information of each parameter can be extracted from the parsed target structure object.
According to the embodiment of the disclosure, the extracted target attribute information of each parameter is correspondingly filled into the parameter frame in the service data template so as to generate the service data object used by the comprehensive transaction platform.
According to an embodiment of the present disclosure, a Comprehensive trading Platform (Comprehensive trading Platform) may be a futures brokerage business management system, including trading, risk control and settlement three major systems.
According to the embodiment of the disclosure, the technical means that the target program package is analyzed into the structural object, the structural object is analyzed to obtain the attribute information, and the obtained attribute information is filled into the service data template is adopted, so that the technical problems that code information is easy to miss when the service data object used by the comprehensive trading platform is written, and the service data object needs to be manually written and has certain understanding on the program language and the learning cost is high are at least partially overcome, and further, the technical effect that the learning cost is reduced by a method for converting the logical target program into the service data object is achieved.
According to an embodiment of the present disclosure, the target attribute information includes at least one of the following information: field level, field name, field type, field length, offset of field, number of arrays, weight of associated arrays, previous level field, and next level field.
According to an embodiment of the present disclosure, a basic concept of target attribute information is explained.
The field Level may be an attribute Level in the target structure object.
The field name may be an attribute id in the target structure object, where idoigin is the field name defined by the communication zone program written in the enterprise generation language.
The field type may be an attribute type in the object structure object, and represents a custom type when the attribute value is custom, and the attribute custom type represents a specific custom type at this time, as shown in the VARIABLE _4 field definition in fig. 1.
The field length may be the attribute length in the target structure object.
The offset of the field may be the attribute offset in the target fabric object.
The number of arrays may be the attribute array in the target structure object.
The attribute isArray in the target structure object indicates whether the field is an array.
The weight of the associated array may be the attribute alRatio in the target structure object when there is a relationship between the upper and lower layers.
The upper level field may be an attribute masterRecord in the target structure object, e.g. a.variable _4 is an upper level field of b.variable _1 in fig. 1.
The next level field may be an attribute subRecord in the target structure object, e.g., b.variable _1 is the next level field of a.variable _ 4.
FIG. 5 schematically shows a flow diagram for generating a service data object according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, at least one template attribute information is included in the service data template.
As shown in fig. 5, populating at least one target attribute information into a parameter box in a service data template to generate a service data object may include operations S501-S503.
In operation S501, at least one template attribute information in a service data template is acquired.
In operation S502, for each template attribute information, at least one target attribute information is matched with the template attribute information, and the target attribute information matched with the template attribute information is determined.
In operation S503, a parameter value corresponding to the target attribute information that matches the template attribute information is filled in a parameter frame corresponding to the template attribute information to obtain a service data object.
According to an embodiment of the present disclosure, the template attribute information may include at least one of the following information: field level, field name, field type, field length, offset of field, number of arrays, weight of associated arrays, previous level field, and next level field.
According to the embodiment of the disclosure, at least one piece of target attribute information obtained by analyzing the target structure object is matched with each piece of template attribute information, and under the condition of successful matching, the target attribute information corresponding to the template attribute information is filled into the parameter frame of the target attribute information so as to generate the service data object.
According to an embodiment of the present disclosure, for each template attribute information, matching at least one target attribute information with the template attribute information, and determining the target attribute information matched with the template attribute information may include the following operations.
And acquiring a relation list, wherein the relation list comprises the corresponding relation between the target attribute information and the template attribute information. And matching each template attribute information with at least one target attribute information according to the relation list, and determining the target attribute information matched with the template attribute information.
According to embodiments of the present disclosure, the relationship list may be given by a developer.
According to the embodiment of the disclosure, when the target attribute information is matched with the template attribute information, the matching can be performed according to the relation list, and after the matching, the target attribute information is filled into the parameter frame of the template attribute information in the service data template corresponding to the value.
According to an embodiment of the present disclosure, the target program includes at least one data structure, wherein each data structure includes a plurality of lines of data definition statements.
The obtaining of the at least one target structure object by parsing the target program may include the following operations.
For each data structure of the target program, the multiple rows of data definition statements of the data structure are parsed using a policy chain to obtain a structure class syntax tree. And serializing a plurality of structure class syntax trees to obtain the structure object. At least one target structure object is determined from the structure objects based on the name of the at least one data structure.
According to an embodiment of the present disclosure, the syntax tree may include a Program syntax tree, a Record syntax tree, a Dataitem syntax tree, and the like, wherein the structure class syntax tree may include the Record syntax tree and the Dataitem syntax tree.
According to an embodiment of the present disclosure, the policy chain includes a plurality of data resolvers respectively established for each data type, for example, the policy chain may include Record-define resolvers and Datetlem-define resolvers.
For each row of data definition statements in the target program, sequentially using a plurality of data resolvers to identify the data definition statements; and parsing the data definition statement using a data parser that successfully identifies the data definition statement to generate a structure class syntax tree. The structure object is obtained by serializing the structure syntax trees. At least one target structure object is determined from the structure objects based on the name of the at least one data structure.
According to an embodiment of the present disclosure, the service data object generation method may further include the following operations.
And transmitting the service data object to the comprehensive trading platform.
According to the embodiment of the disclosure, the generated service data object is transmitted to the comprehensive trading platform for use.
According to an embodiment of the present disclosure, parsing the at least one target structure object to obtain the at least one target attribute information of the at least one target structure object may include the following operations.
And analyzing the target structure object to obtain a target function linked list for each target structure object, wherein the target function linked list comprises a plurality of data fields. And acquiring at least one piece of target attribute information according to the field attributes of the plurality of data fields.
According to an embodiment of the disclosure, a program written in a target program for an enterprise generation language is exemplified.
For example, according to the "recordedtem" of the function linked list, the function name "coderecordedtem" corresponding to the "recordeltem" is obtained from the data dictionary, so that a plurality of rows of object statements containing the "coderecordedtem" may be determined in the function linked list, for example, one row of object statements may be "coderecordeltem-class: egl. eglrecordedtem @49139829 level: 3 id: variable _1 idoorigin: VARIABLE _1 type: int custom type: length: 5 offset: 0 array: 1 isArray: false ". In the target statement, a plurality of target attribute information may be obtained, for example, a field level of 3 and a field name ID of variable _1 may be obtained.
Based on the service data object generation method, the disclosure also provides a service data object generation device. The apparatus will be described in detail below with reference to fig. 6.
Fig. 6 schematically shows a block diagram of a service data object generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the service data object generation apparatus 600 of this embodiment may include a first obtaining module 610, a second obtaining module 620, and a filling module 630.
The first obtaining module 610 is configured to obtain at least one target structure object by parsing a target program. In an embodiment, the first obtaining module 610 may be configured to perform the operation S401 described above, which is not described herein again.
The second obtaining module 620 is configured to parse each target structure object to obtain at least one target attribute information of the target structure object. In an embodiment, the second obtaining module 620 may be configured to perform the operation S402 described above, which is not described herein again.
The filling module 630 is configured to fill the parameter box in the service data template with the at least one target attribute information to generate a service data object. In an embodiment, the padding module 630 may be configured to perform the operation S403 described above, which is not described herein again.
According to the embodiment of the disclosure, the technical means that the target program package is analyzed into the structural object, the structural object is analyzed to obtain the attribute information, and the obtained attribute information is filled into the service data template is adopted, so that the technical problems that code information is easy to miss when the service data object used by the comprehensive trading platform is written, and the service data object needs to be manually written and has certain understanding on the program language and the learning cost is high are at least partially overcome, and further, the technical effect that the learning cost is reduced by a method for converting the logical target program into the service data object is achieved.
According to an embodiment of the present disclosure, the target attribute information includes at least one of the following information: field level, field name, field type, field length, offset of field, number of arrays, weight of associated arrays, previous level field, and next level field.
According to an embodiment of the present disclosure, at least one template attribute information is included in the service data template.
According to an embodiment of the present disclosure, the padding module 630 may include a first obtaining unit, a first determining unit, and a padding unit.
The device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring at least one template attribute information in a service data template.
And the first determining unit is used for matching at least one piece of target attribute information with the template attribute information aiming at each piece of template attribute information and determining the target attribute information matched with the template attribute information.
And the filling unit is used for filling the parameter value corresponding to the target attribute information matched with the template attribute information into the parameter frame corresponding to the template attribute information so as to obtain the service data object.
According to an embodiment of the present disclosure, the first determination unit may include an acquisition subunit and a determination subunit.
And the obtaining subunit is used for obtaining a relation list, wherein the relation list comprises the corresponding relation between the target attribute information and the template attribute information.
And the determining subunit is used for matching each template attribute information with at least one target attribute information according to the relationship list, and determining the target attribute information matched with the template attribute information.
According to an embodiment of the present disclosure, the target program includes at least one data structure, wherein each data structure includes a plurality of lines of data definition statements.
According to an embodiment of the present disclosure, the first obtaining module 610 may include a first parsing unit, a serialization unit, and a second determination unit.
And the first analysis unit is used for analyzing the multi-line data definition statement of the data structure body by using the strategy chain for each data structure body of the target program so as to obtain the structure type syntax tree.
And the serialization unit is used for serializing the plurality of structure type syntax trees to obtain the structure object.
A second determining unit, configured to determine at least one target structure object from the structure objects according to the name of the at least one data structure.
According to an embodiment of the present disclosure, the service data object generating apparatus may further include a transmission module.
And the transmission module is used for transmitting the service data object to the comprehensive trading platform.
According to an embodiment of the present disclosure, the second obtaining module 620 may include a second parsing unit and a second obtaining unit.
And the second analysis unit is used for analyzing the target structure object to obtain a target function linked list, wherein the target function linked list comprises a plurality of data fields.
And the second acquisition unit is used for acquiring at least one piece of target attribute information according to the field attributes of the plurality of data fields.
According to an embodiment of the present disclosure, any plurality of the first obtaining module 610, the second obtaining module 620, and the padding module 630 may be combined into one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first obtaining module 610, the second obtaining module 620, and the padding module 630 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the first obtaining module 610, the second obtaining module 620 and the populating module 630 may be implemented at least in part as a computer program module that, when executed, may perform a corresponding function.
Fig. 7 schematically shows a block diagram of an electronic device adapted to implement the service data object generation method according to an embodiment of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 700 may also include input/output (I/O) interface 705, which input/output (I/O) interface 705 is also connected to bus 704, according to an embodiment of the present disclosure. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the item recommendation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 701. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, Python, C, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A service data object generation method, comprising:
obtaining at least one target structure object by analyzing a target program;
analyzing each target structure object to obtain at least one piece of target attribute information of the target structure object; and
and filling the at least one target attribute information into a parameter frame in a service data template to generate the service data object.
2. The method of claim 1, wherein the target attribute information comprises at least one of: field level, field name, field type, field length, offset of field, number of arrays, weight of associated arrays, previous level field, and next level field.
3. The method of claim 1, wherein the service data template includes at least one template attribute information;
wherein the populating the at least one target attribute information into a parameter box in a service data template to generate the service data object includes:
acquiring the at least one template attribute information in the service data template;
for each template attribute information, matching the at least one target attribute information with the template attribute information, and determining the target attribute information matched with the template attribute information; and
and filling a parameter value corresponding to the target attribute information matched with the template attribute information into the parameter frame corresponding to the template attribute information to obtain the service data object.
4. The method of claim 3, wherein the matching the at least one target attribute information with the template attribute information for each of the template attribute information, determining the target attribute information that matches the template attribute information, comprises:
acquiring a relation list, wherein the relation list comprises the corresponding relation between the target attribute information and the template attribute information;
and matching each template attribute information with the at least one target attribute information according to the relation list, and determining the target attribute information matched with the template attribute information.
5. The method of claim 1, wherein the target program comprises at least one data structure, wherein each data structure comprises a plurality of lines of data definition statements;
wherein the obtaining at least one target structure object by parsing the target program comprises:
for each data structure body of the target program, analyzing a plurality of rows of data definition statements of the data structure body by using a strategy chain to obtain a structure class syntax tree;
serializing the plurality of structure class syntax trees to obtain the structure object; and
and determining the at least one target structure object from the structure objects according to the name of the at least one data structure body.
6. The method of claim 1, further comprising:
and transmitting the service data object to a comprehensive trading platform.
7. The method of claim 1, wherein said parsing said at least one target structure object to obtain at least one target property information of at least one said target structure object comprises:
analyzing the target structure object to obtain a target function linked list for each target structure object, wherein the target function linked list comprises a plurality of data fields; and
and acquiring the at least one piece of target attribute information according to the field attributes of the plurality of data fields.
8. A service data object generation apparatus comprising:
the first acquisition module is used for acquiring at least one target structure object by analyzing a target program;
the second acquisition module is used for analyzing each target structure object to acquire at least one piece of target attribute information of the target structure object; and
and the filling module is used for filling a parameter frame in a service data template by using the at least one target attribute information so as to generate the service data object.
9. An electronic device, comprising:
one or more processors;
a memory to store one or more instructions that,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202110674753.0A 2021-06-17 2021-06-17 Service data object generation method, generation device, electronic device and storage medium Pending CN113392623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110674753.0A CN113392623A (en) 2021-06-17 2021-06-17 Service data object generation method, generation device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110674753.0A CN113392623A (en) 2021-06-17 2021-06-17 Service data object generation method, generation device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN113392623A true CN113392623A (en) 2021-09-14

Family

ID=77621735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110674753.0A Pending CN113392623A (en) 2021-06-17 2021-06-17 Service data object generation method, generation device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113392623A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033634A (en) * 2022-07-08 2022-09-09 建信金融科技有限责任公司 Data acquisition method, data acquisition device, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109325078A (en) * 2018-09-18 2019-02-12 拉扎斯网络科技(上海)有限公司 Data blood margin determination method and device based on structural data
CN111488174A (en) * 2020-04-14 2020-08-04 苏州达家迎信息技术有限公司 Method and device for generating application program interface document, computer equipment and medium
US10782942B1 (en) * 2019-09-13 2020-09-22 Capital One Services, Llc Rapid onboarding of data from diverse data sources into standardized objects with parser and unit test generation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109325078A (en) * 2018-09-18 2019-02-12 拉扎斯网络科技(上海)有限公司 Data blood margin determination method and device based on structural data
US10782942B1 (en) * 2019-09-13 2020-09-22 Capital One Services, Llc Rapid onboarding of data from diverse data sources into standardized objects with parser and unit test generation
CN111488174A (en) * 2020-04-14 2020-08-04 苏州达家迎信息技术有限公司 Method and device for generating application program interface document, computer equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033634A (en) * 2022-07-08 2022-09-09 建信金融科技有限责任公司 Data acquisition method, data acquisition device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US20100306738A1 (en) Templating system and method for updating content in real time
WO2017027868A1 (en) Configurable development platform integrating heterogeneous persistence systems
CN110865889B (en) Method and device for transmitting event between components
CN111221521A (en) Method and device for generating log code, computer system and readable storage medium
CN113778848A (en) Test code generation method, device, computer system and medium
CN113419740B (en) Program data stream analysis method and device, electronic equipment and readable storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN114237651A (en) Installation method and device of cloud native application, electronic equipment and medium
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN116720489B (en) Page filling method and device, electronic equipment and computer readable storage medium
CN113392623A (en) Service data object generation method, generation device, electronic device and storage medium
CN113495498A (en) Simulation method, simulator, device, and medium for hardware device
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN113392014B (en) Test case generation method, device, electronic equipment and medium
CN114691527A (en) Unit test case generation method, apparatus, device, medium, and program product
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113138767A (en) Code language conversion method, device, electronic equipment and storage medium
CN113392112A (en) Data analysis method, data analysis device, electronic device, and storage medium
CN115687815A (en) Page information display method, device, equipment and medium
CN113487224A (en) Content processing method, apparatus, device, medium, and program product
CN111400623A (en) Method and apparatus for searching information
CN112860259B (en) Interface processing method, device, electronic equipment and storage medium
CN111061971B (en) Method and device for extracting information
CN115687090A (en) Test case generation method, device, equipment and medium
CN113377377A (en) Static code analysis method, analysis device, electronic device and readable storage medium

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