Service data object generation method, generation device, electronic device and storage medium
By analyzing the target program to obtain and fill the target attribute information into the service data template, the service data object is generated, and the problem of omission of code information and high learning costs when writing the service data object is solved, and more efficient service data object generation is achieved.
Patent Information
- Application Number
- CN202110674753.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-06-17
AI Technical Summary
In the platform project under the host, writing service data objects used by the comprehensive trading platform is prone to omission of code information, and manually writing service data objects requires understanding of the programming language, which is relatively expensive to learn.
The target structure object is obtained by parsing the target program, the target attribute information is obtained, and the service data object is populated into the parameter box in the service data template to generate the service data object. The method includes obtaining the target structure object, parsing its attribute information, and matching it with the template attribute information in the service data template to generate a complete service data object.
It reduces the learning cost when writing service data objects, reduces the risk of missing code information, and improves the efficiency of generating service data objects.
Smart Images

Figure CN113392623B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer and financial technology, and more specifically, to a service data object generation method, a service data object generation device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the project of the platform under the host, in order to migrate the program on the host to the integrated trading platform, a large number of communication area structures written in Enterprise Generation Language (EGL) need to be converted into service data objects used by the integrated trading platform.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: code information is easily omitted when writing service data objects used in the comprehensive trading platform, and manual writing of service data objects requires a certain understanding of the programming language, which has a high learning cost. Summary of the invention
[0004] In view of this, the present disclosure provides a service data object generation method, a service data object generation device, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] One aspect of the present disclosure provides a method for generating a service data object, comprising:
[0006] Obtain at least one target structure object by parsing the target program;
[0007] Parsing each of the target structure objects to obtain at least one target attribute information of the target structure object; and
[0008] Fill the at least one target attribute information into the parameter box in the service data template to generate the service data object.
[0009] According to an embodiment of the present disclosure, the above-mentioned target attribute information includes at least one of the following information: field level, field name, field type, field length, field offset, number of arrays, weight of associative arrays, previous level field and next level field.
[0010] According to an embodiment of the present disclosure, the above service data template includes at least one template attribute information;
[0011] The step of filling the at least one target attribute information into a parameter box in a service data template to generate the service data object includes:
[0012] Obtaining at least one template attribute information in the service data template;
[0013] For each of the template attribute information, matching the at least one target attribute information with the template attribute information to determine the target attribute information that matches the template attribute information; and
[0014] Fill the parameter value corresponding to the target attribute information matching the above template attribute information into the above parameter box corresponding to the above template attribute information to obtain the above service data object.
[0015] According to an embodiment of the present disclosure, for each of the template attribute information, matching the at least one target attribute information with the template attribute information to determine the target attribute information matching the template attribute information includes:
[0016] Acquire a relationship list, wherein the relationship list includes a correspondence between the target attribute information and the template attribute information;
[0017] According to the relationship list, each of the template attribute information is matched with the at least one target attribute information to determine the target attribute information that matches the template attribute information.
[0018] According to an embodiment of the present disclosure, the target program includes at least one data structure, wherein each data structure includes multiple lines of data definition statements;
[0019] The obtaining of at least one target structure object by parsing the target program includes:
[0020] For each data structure of the target program, use the policy chain to parse multiple lines of data definition statements of the data structure to obtain a structure class syntax tree;
[0021] Serialize the above multiple structure class syntax trees to obtain the above structure objects; and
[0022] According to the name of at least one of the data structures, the at least one target structure object is determined from the structure objects.
[0023] According to an embodiment of the present disclosure, the service data object generation method further includes:
[0024] The above service data objects are transmitted to the integrated trading platform.
[0025] According to an embodiment of the present disclosure, parsing the at least one target structure object to obtain at least one target attribute information of the at least one target structure object includes:
[0026] For each target structure object, parsing the target structure object to obtain a target function linked list, wherein the target function linked list includes a plurality of data fields; and
[0027] The at least one target attribute information is obtained according to the field attributes of the multiple data fields.
[0028] Another aspect of the present disclosure provides a service data object generation device, comprising:
[0029] A first acquisition module, used for acquiring at least one target structure object by parsing the target program;
[0030] A second acquisition module is used to parse each of the target structure objects to obtain at least one target attribute information of the target structure object; and
[0031] A filling module is used to fill the parameter box in the service data template with the at least one target attribute information to generate the service data object.
[0032] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method as described above.
[0033] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0034] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and when the instructions are executed, are used to implement the method as described above.
[0035] According to the embodiments of the present disclosure, a technical method is provided by parsing a target program package into a structural object, parsing the structural object to obtain attribute information, and filling the obtained attribute information into a service data template. Therefore, the technical problem that code information is easily omitted when writing service data objects used in a comprehensive transaction platform, and that manual writing of service data objects requires a certain understanding of the programming language and has a high learning cost is at least partially overcome. Thus, the technical effect of reducing the learning cost is achieved by converting a target program in a logical form into a service data object. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0037] Figure 1 A schematic diagram of a code of an EGL communication area according to an embodiment of the present disclosure is schematically shown;
[0038] Figure 2 A schematic diagram of a code of a service data object according to an embodiment of the present disclosure is shown;
[0039] Figure 3 The application scenario diagram of the service data object generation method according to the embodiment of the present disclosure is schematically shown;
[0040] Figure 4 A flowchart of a method for generating a service data object according to an embodiment of the present disclosure is schematically shown;
[0041] Figure 5 A flowchart of generating a service data object according to an embodiment of the present disclosure is schematically shown;
[0042] Figure 6 A schematic diagram showing a structural block diagram of a service data object generating device according to an embodiment of the present disclosure; and
[0043] Figure 7 A block diagram of an electronic device suitable for implementing a method for generating a service data object according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0044] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0045] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0046] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0047] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0048] Figure 1 A code schematic diagram of an EGL communication area according to an embodiment of the present disclosure is schematically shown.
[0049] Figure 2 A code diagram of a service data object according to an embodiment of the present disclosure is schematically shown.
[0050] The EGL communication area is a data structure used by Enterprise Generation Language (EGL), such as Figure 1 shown.
[0051] In the current host platform projects, a large number of EGL communication area structures need to be converted into service data objects used by the Comprehensive Transaction Platform.
[0052] A service data object is a data structure used by platform applications, such as Figure 2 As shown, Figure 2 In the example, Record_A indicates the name of the data structure, and variable_1, variable_2, and variable_3 are the three fields defined in Record_A. At the same time, other structures can be nested in Record_A, as shown in Sub_Record_B.
[0053] Currently, the definition of EGL communication area is converted into the definition of service data object mainly through manual methods. Since there are many EGL programs on the host, the definition of communication area used is very large, which requires a lot of manpower investment. At the same time, when writing service data objects, the programmer needs to understand the definition of EGL communication area first, which requires the programmer to have additional knowledge of host development and a certain understanding of host syntax.
[0054] Therefore, manually writing service data objects requires a large number of developers and has a high learning cost.
[0055] In view of this, an embodiment of the present disclosure provides a service data object generation method, which includes obtaining at least one target structure object process by parsing the target program, parsing each of the target structure objects to obtain at least one target attribute information process of the target structure object, and filling the at least one target attribute information into a parameter box in a service data template to generate the service data object process.
[0056] It should be noted that the service data object generation method and device provided in the present disclosure can be used in the financial field, such as banks, or can be used in any field other than the financial field, such as hospitals. Therefore, the application field of the service data object generation method and device provided in the present disclosure is not limited.
[0057] Figure 3 The application scenario diagram of the service data object generation method according to the embodiment of the present disclosure is schematically shown.
[0058] like Figure 3 As shown, the application scenario 300 according to this embodiment may include terminal devices 301, 302, 303, a network 304 and a server 305. The network 304 is used to provide a medium for a communication link between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0059] The user can use the terminal devices 301, 302, 303 to interact with the server 305 through the network 304 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 301, 302, 303, such as service data object generation applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0060] The terminal devices 301 , 302 , and 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0061] The server 305 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 301, 302, and 303. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as generating service data objects according to user requests, etc.) to the terminal device.
[0062] It should be noted that the service data object generation method provided in the embodiment of the present disclosure can generally be executed by the terminal devices 301, 302, and 303. Accordingly, the service data object generation device provided in the embodiment of the present disclosure can generally be set in the terminal devices 301, 302, and 303. The service data object generation method provided in the embodiment of the present disclosure can also be executed by the server 305. Accordingly, the service data object generation device provided in the embodiment of the present disclosure can generally be set in the server 305. The service data object generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 305 and can communicate with the terminal devices 301, 302, 303 and / or the server 305. Accordingly, the service data object generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 305 and can communicate with the terminal devices 301, 302, 303 and / or the server 305.
[0063] It should be understood that Figure 3 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0064] The following will be based on Figure 3 The scene described by Figure 4-5 The service data object generation method of the embodiment of the present disclosure is described in detail.
[0065] Figure 4 The flowchart of the service data object generation method according to the embodiment of the present disclosure is schematically shown.
[0066] like Figure 4 As shown, one aspect of the present disclosure provides a method for generating a service data object, which may include operations S401 to S403.
[0067] In operation S401, at least one target structure object is obtained by parsing a target program.
[0068] In operation S402, each target structure object is parsed to obtain at least one target attribute information of the target structure object.
[0069] In operation S403, at least one target attribute information is filled into a parameter box in the service data template to generate a service data object.
[0070] According to an embodiment of the present disclosure, the target 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. The service data object may include but is not limited to an xsd file and a dataset file.
[0071] According to an 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 the name of a data structure, fields defined by the data structure, field types, etc., 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, where xs:int represents a signed 32-bit integer; the dataset file may include the field name and the name of the data structure, etc., for example, the field name may be property0, and the name of the data structure may be variable_1.
[0072] According to an embodiment of the present disclosure, a target structure object can be obtained by serializing a target program, wherein the target structure object is obtained by serializing a data definition statement of each data structure in the target program.
[0073] According to an embodiment of the present disclosure, a serialized object such as a target structure object may be a data file in a binary data format, and target attribute information of each parameter may be extracted from the parsed target structure object.
[0074] According to an embodiment of the present disclosure, the extracted target attribute information of each parameter is correspondingly filled into the parameter box in the service data template to generate a service data object used by the comprehensive transaction platform.
[0075] According to an embodiment of the present disclosure, a comprehensive transaction platform may be a futures brokerage business management system, including three major systems: transaction, risk control, and settlement.
[0076] According to the embodiments of the present disclosure, a technical method is provided by parsing a target program package into a structural object, parsing the structural object to obtain attribute information, and filling the obtained attribute information into a service data template. Therefore, the technical problem that code information is easily omitted when writing service data objects used in a comprehensive transaction platform, and that manual writing of service data objects requires a certain understanding of the programming language and has a high learning cost is at least partially overcome. Thus, the technical effect of reducing the learning cost is achieved by converting a target program in a logical form into a service data object.
[0077] 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, field offset, number of arrays, weight of associated arrays, previous level field, and next level field.
[0078] According to an embodiment of the present disclosure, a basic concept of target attribute information is explained.
[0079] The field level can be the attribute Level in the target structure object.
[0080] The field name may be the attribute id in the target structure object, where idOrigin is the field name defined in the communication area program written in the enterprise generation language.
[0081] The field type can be the attribute type in the target structure object. When the attribute value is custom, it indicates a custom type. In this case, the attribute customType indicates the specific custom type, such as Figure 1 As shown in the VARIABLE_4 field definition.
[0082] The field length can be the attribute length in the target structure object.
[0083] The offset of the field can be the attribute offset in the target structure object.
[0084] The number of arrays can be the attribute array in the target structure object.
[0085] The isArray property in the target structure object indicates whether the field is an array.
[0086] The weight of the associative array may be the attribute alRatio in the target structure object when there is a hierarchical relationship.
[0087] The previous level field can be the attribute masterRecord in the target structure object, for example Figure 1 A.VARIABLE_4 is the parent field of B.VARIABLE_1.
[0088] The next level field may be the attribute subRecord in the target structure object, for example, B.VARIABLE_1 is the next level field of A.VARIABLE_4.
[0089] Figure 5 The flowchart of generating a service data object according to an embodiment of the present disclosure is schematically shown.
[0090] According to an embodiment of the present disclosure, the service data template includes at least one template attribute information.
[0091] like Figure 5 As shown, filling 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 to S503.
[0092] In operation S501, at least one template attribute information in a service data template is acquired.
[0093] In operation S502, for each piece of template attribute information, at least one target attribute information is matched with the template attribute information to determine the target attribute information that matches the template attribute information.
[0094] In operation S503, a parameter value corresponding to the target attribute information matching the template attribute information is filled into a parameter box corresponding to the template attribute information to obtain a service data object.
[0095] According to an embodiment of the present disclosure, template attribute information may include at least one of the following information: field level, field name, field type, field length, field offset, number of arrays, weight of associated arrays, previous level field, and next level field.
[0096] According to an embodiment of the present disclosure, at least one target attribute information obtained by parsing the target structure object is matched with each template attribute information respectively. When the match is successful, the target attribute information corresponding to the template attribute information is filled into its parameter box to generate a service data object.
[0097] 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 matching the template attribute information may include the following operations.
[0098] A relationship list is obtained, wherein the relationship list includes a correspondence between target attribute information and template attribute information. According to the relationship list, each template attribute information is matched with at least one target attribute information to determine the target attribute information that matches the template attribute information.
[0099] According to an embodiment of the present disclosure, the relationship list may be given by a developer.
[0100] According to an embodiment of the present disclosure, when matching target attribute information with template attribute information, matching may be performed based on a relationship list, and after matching, the target attribute information is filled into a parameter box of the template attribute information in the service data template corresponding to the value.
[0101] According to an embodiment of the present disclosure, the target program includes at least one data structure, wherein each data structure includes multiple lines of data definition statements.
[0102] Wherein, obtaining at least one target structure object by parsing the target program may include the following operations.
[0103] For each data structure of the target program, a policy chain is used to parse multiple lines of data definition statements of the data structure to obtain a structure class syntax tree. Multiple structure class syntax trees are serialized to obtain structure objects. At least one target structure object is determined from the structure objects according to the name of at least one data structure.
[0104] According to an embodiment of the present disclosure, a syntax tree may include a Program syntax tree, a Record syntax tree, a Dataitem syntax tree, etc., wherein a structure-type syntax tree may include a Record syntax tree and a Dataitem syntax tree.
[0105] According to an embodiment of the present disclosure, the policy chain includes a plurality of data parsers respectively established for each data type. For example, the policy chain may include a Record-define parser and a Dateltem-define parser.
[0106] For each line of data definition statement in the target program, multiple data parsers are used in sequence to identify the data definition statement; and the data parser that successfully identifies the data definition statement is used to parse the data definition statement to generate a structure-like syntax tree. Multiple structure-like syntax trees are serialized to obtain multiple structure objects. At least one target structure object is determined from the structure objects according to the name of at least one data structure.
[0107] According to an embodiment of the present disclosure, the service data object generation method may further include the following operations.
[0108] Transmitting service data objects to the integrated trading platform.
[0109] According to an embodiment of the present disclosure, the service data object generated above is transmitted to the integrated transaction platform for its use.
[0110] According to an embodiment of the present disclosure, parsing at least one target structure object to obtain at least one target attribute information of the at least one target structure object may include the following operations.
[0111] For each target structure object, the target structure object is parsed to obtain a target function linked list, wherein the target function linked list includes a plurality of data fields, and at least one target attribute information is obtained according to the field attributes of the plurality of data fields.
[0112] According to the embodiments of the present disclosure, a target program is taken as an example of a program written in an enterprise generation language.
[0113] For example, according to the "RecordItem" of the function list, the function name corresponding to the "RecordItem" is obtained from the data dictionary as "CodeRecordItem", so that multiple rows of target statements containing "CodeRecordItem" can be determined in the function list, for example, one row of the target statement can be "CodeRecordItem-class: egl.EglRecordItem@49139829level: 3id: variable_1idOrigin: VARIABLE_1 type: int customType: length: 5offset: 0 array: 1 isArray: false". In this target statement, multiple target attribute information can be obtained, for example, the field level level 3 and the field name ID variable_1 can be obtained.
[0114] Based on the above service data object generation method, the present disclosure also provides a service data object generation device. Figure 6 The device is described in detail.
[0115] Figure 6 The structural block diagram of the service data object generation device according to the embodiment of the present disclosure is schematically shown.
[0116] like Figure 6 As shown, the service data object generating device 600 of this embodiment may include a first obtaining module 610 , a second obtaining module 620 and a filling module 630 .
[0117] The first acquisition module 610 is used to acquire at least one target structure object by parsing the target program. In one embodiment, the first acquisition module 610 can be used to perform the operation S401 described above, which will not be described in detail here.
[0118] The second acquisition module 620 is used to parse each target structure object to obtain at least one target attribute information of the target structure object. In one embodiment, the second acquisition module 620 can be used to perform the operation S402 described above, which will not be repeated here.
[0119] The filling module 630 is used to fill at least one target attribute information into the parameter box in the service data template to generate a service data object. In one embodiment, the filling module 630 can be used to perform the operation S403 described above, which will not be repeated here.
[0120] According to the embodiments of the present disclosure, a technical method is provided by parsing a target program package into a structural object, parsing the structural object to obtain attribute information, and filling the obtained attribute information into a service data template. Therefore, the technical problem that code information is easily omitted when writing service data objects used in a comprehensive transaction platform, and that manual writing of service data objects requires a certain understanding of the programming language and has a high learning cost is at least partially overcome. Thus, the technical effect of reducing the learning cost is achieved by converting a target program in a logical form into a service data object.
[0121] 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, field offset, number of arrays, weight of associated arrays, previous level field, and next level field.
[0122] According to an embodiment of the present disclosure, the service data template includes at least one template attribute information.
[0123] According to an embodiment of the present disclosure, the filling module 630 may include a first acquiring unit, a first determining unit, and a filling unit.
[0124] The first acquisition unit is used to acquire at least one template attribute information in the service data template.
[0125] The first determining unit is used to match at least one target attribute information with the template attribute information for each template attribute information, and determine the target attribute information matching the template attribute information.
[0126] The filling unit is used to fill the parameter value corresponding to the target attribute information matching the template attribute information into the parameter box corresponding to the template attribute information to obtain the service data object.
[0127] According to an embodiment of the present disclosure, the first determining unit may include an acquiring subunit and a determining subunit.
[0128] The acquisition subunit is used to acquire a relationship list, wherein the relationship list includes a correspondence between target attribute information and template attribute information.
[0129] The determination subunit is used to match each template attribute information with at least one target attribute information according to the relationship list, and determine the target attribute information that matches the template attribute information.
[0130] According to an embodiment of the present disclosure, the target program includes at least one data structure, wherein each data structure includes multiple lines of data definition statements.
[0131] According to an embodiment of the present disclosure, the first acquisition module 610 may include a first parsing unit, a serialization unit, and a second determination unit.
[0132] The first parsing unit is used to parse multiple lines of data definition statements of each data structure of the target program using the policy chain to obtain a structure class syntax tree.
[0133] The serialization unit is used to serialize multiple structure class syntax trees to obtain structure objects.
[0134] The second determining unit is used to determine at least one target structure object from the structure objects according to the name of at least one data structure.
[0135] According to an embodiment of the present disclosure, the service data object generating apparatus may further include a transmission module.
[0136] The transmission module is used to transmit the service data object to the integrated trading platform.
[0137] According to an embodiment of the present disclosure, the second acquisition module 620 may include a second parsing unit and a second acquisition unit.
[0138] The second parsing unit is used for parsing the target structure object for each target structure object to obtain a target function linked list, wherein the target function linked list includes a plurality of data fields.
[0139] The second acquisition unit is used to acquire at least one target attribute information according to the field attributes of the multiple data fields.
[0140] According to an embodiment of the present disclosure, any multiple modules of the first acquisition module 610, the second acquisition module 620 and the filling module 630 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 610, the second acquisition module 620 and the filling module 630 can be at least partially implemented 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the first acquisition module 610, the second acquisition module 620 and the filling module 630 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0141] Figure 7 A block diagram of an electronic device suitable for implementing a method for generating a service data object according to an embodiment of the present disclosure is schematically shown.
[0142] like Figure 7 As shown, the 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 part 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 a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0143] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0144] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 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, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0145] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0146] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0147] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.
[0148] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0149] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0150] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0151] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, Python, C language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0152] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0154] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for generating a service data object, comprising: Acquire at least one target structure object by parsing a target program, wherein the target program includes a communication area program written in an enterprise generation language; Parsing each of the target structure objects to obtain at least one target attribute information of the target structure object; and Filling the at least one target attribute information into a parameter box in a service data template to generate the service data object; Wherein, the target program includes at least one data structure, wherein each data structure includes multiple lines of data definition statements; The step of obtaining at least one target structure object by parsing the target program includes: For each data structure of the target program, a policy chain is used to parse multiple lines of data definition statements of the data structure to obtain a structure class syntax tree, wherein the policy chain includes multiple data parsers established for each data type; Serializing the multiple structure class syntax trees to obtain the structure object; and According to the name of at least one of the data structures, the at least one target structure object is determined from the structure objects.
2. The method according to claim 1, wherein: The target attribute information includes at least one of the following information: field level, field name, field type, field length, field offset, array quantity, associative array weight, previous level field, and next level field.
3. The method according to claim 1, wherein: The service data template includes at least one template attribute information; The step of filling the at least one target attribute information into a parameter box in a service data template to generate the service data object includes: Acquire the at least one template attribute information in the service data template; For each of the template attribute information, matching the at least one target attribute information with the template attribute information to determine the target attribute information matching the template attribute information; and Fill the parameter value corresponding to the target attribute information matching the template attribute information into the parameter box corresponding to the template attribute information to obtain the service data object.
4. The method according to claim 3, wherein: The step of matching the at least one target attribute information with the template attribute information for each of the template attribute information to determine the target attribute information matching the template attribute information includes: Acquire a relationship list, wherein the relationship list includes a correspondence between the target attribute information and the template attribute information; According to the relationship list, each of the template attribute information is matched with the at least one target attribute information to determine the target attribute information that matches the template attribute information.
5. The method according to claim 1, further comprising: The service data object is transmitted to the integrated trading platform.
6. The method according to claim 1, wherein: The parsing of the at least one target structure object to obtain at least one target attribute information of the at least one target structure object includes: For each target structure object, parse the target structure object to obtain a target function linked list, wherein the target function linked list includes a plurality of data fields; and The at least one target attribute information is acquired according to the field attributes of the multiple data fields.
7. A service data object generating device, comprising: A first acquisition module, configured to acquire at least one target structure object by parsing a target program, wherein the target program includes a communication area program written in an enterprise generation language; A second acquisition module is used to parse each of the target structure objects to obtain at least one target attribute information of the target structure object; and A filling module, used to fill a parameter box in a service data template with the at least one target attribute information to generate the service data object; Wherein, the target program includes at least one data structure, wherein each data structure includes a plurality of lines of data definition statements; Wherein, the first acquisition module includes: A first parsing unit is used to parse multiple lines of data definition statements of each data structure of the target program using a policy chain to obtain a structure class syntax tree, wherein the policy chain includes multiple data parsers established for each data type respectively; The serialization unit is used to serialize multiple structure class syntax trees to obtain structure objects; The second determining unit is used to determine at least one target structure object from the structure objects according to the name of at least one data structure.
8. An electronic device comprising: one or more processors; a memory for storing one or more instructions, Wherein, when the one or more instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is enabled to implement the method according to any one of claims 1 to 6.
10. A computer program product, comprising computer executable instructions, which are used to implement the method of any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Application program interface document generation method and device, computer equipment and medium
CN111488174A