+

CN110765102B - Service data processing method and device, computer equipment and storage medium - Google Patents

Service data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110765102B
CN110765102B CN201910923463.8A CN201910923463A CN110765102B CN 110765102 B CN110765102 B CN 110765102B CN 201910923463 A CN201910923463 A CN 201910923463A CN 110765102 B CN110765102 B CN 110765102B
Authority
CN
China
Prior art keywords
service
data
entity
data table
party server
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.)
Active
Application number
CN201910923463.8A
Other languages
Chinese (zh)
Other versions
CN110765102A (en
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.)
Jiangsu Suning Cloud Computing Co ltd
SuningCom Co ltd
Original Assignee
Suning Cloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN201910923463.8A priority Critical patent/CN110765102B/en
Publication of CN110765102A publication Critical patent/CN110765102A/en
Application granted granted Critical
Publication of CN110765102B publication Critical patent/CN110765102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a method, a system, a computer device and a storage medium for processing service data. The method comprises the following steps: acquiring the service data uploaded by the third-party server, and packaging the service data to obtain a service entity; extracting the service type of the service entity, and determining a data table matched with the service type in a preset database according to the service type; performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and then pulling the service data into the data table; and processing the service corresponding to the service data according to the data table to obtain a processing result, and transmitting the processing result back to the third-party server. According to the method and the device, the service data uploaded by the third-party server are converted into the unified data model through path analysis and data format conversion, different service butt joint schemes do not need to be set for different third-party partners, and the butt joint efficiency of the third-party server and the partners is improved.

Description

Service data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing service data, a computer device, and a storage medium.
Background
Generally, an enterprise as a service provider needs to perform business interfacing with a third-party service consumer, and an enterprise as a service consumer needs to perform business interfacing with a third-party service provider. When the number of the partners for enterprise docking is large, the service type of docking is complicated due to large protocol difference of each partner, and therefore the problem of low docking efficiency is often caused.
In the existing technical scheme, because the protocol difference between all the partners is very large, the data formats are various, and the service flow is solidified, a set of independent design schemes are adopted for technical docking of different partners and different services. However, the prior art solutions have at least the following drawbacks:
different service docking schemes are adopted for different partners and different services, so that the technical implementation complexity is increased, and the service docking efficiency with the partners is reduced.
Disclosure of Invention
Based on this, it is necessary to provide a processing method, an apparatus, a computer device and a storage medium, which can convert service data of different protocols uploaded by a third-party server into service data of a unified data model through a data table in a preset database, for solving the above technical problems.
A method for processing service data, the method comprising:
acquiring path information of storage service data uploaded by a third-party server, and analyzing the path information;
acquiring the service data according to the analyzed path information, and packaging the service data to obtain a service entity;
extracting the service type of the service entity, and determining a data table matched with the service type in a preset database according to the service type;
performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table;
and calling a corresponding service execution unit according to the data table to process the service corresponding to the service data to obtain a processing result, and returning the processing result to the third-party server.
In one embodiment, the obtaining the service data according to the analyzed path information, and encapsulating the service data to obtain a service entity includes:
acquiring a service file containing the service data from the analyzed path information;
analyzing the file name and the file format of the service file;
extracting the service data from the analyzed service file; checking the service data;
and setting the checked service data into the value of the entity field contained in the entity to create the service entity containing a plurality of entity fields.
In one embodiment, the extracting the service type of the service entity and determining a data table matched with the service type in a preset database according to the service type includes:
extracting the service type of the service entity from the entity field;
and acquiring a data table matched with the service type of the service entity according to the mapping relation between the service type in the preset database and the data table.
In one embodiment, the performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table includes:
extracting each entity field in the service entity;
matching each entity field in the service entity with each reference field in the data table;
converting the data format of the service data in the service entity into the data format of the reference field according to the matching result, wherein the data format includes but is not limited to:
the number of entity fields in the business entity, the meaning represented by the entity fields and separators among the entity fields;
and pulling the converted service data into the data table.
In one embodiment, the data table includes identification information of a partner to which the third-party server belongs, and the processing the service corresponding to the service data according to the data table to obtain a processing result includes:
acquiring the data type of the data table and the identification information of a partner to which the third-party server belongs from the data table;
acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type of the data table and the identification information;
assembling the one or more service execution units according to the execution sequence to generate a service unit execution group;
calling the service unit execution group to process the service corresponding to the service data to obtain a processing result;
and transmitting the processing result back to the third-party server.
In one embodiment, the method further comprises the following steps:
receiving a request for creating a new service execution unit;
responding to the request for creating the new service execution unit, and displaying an editing interface of the source code of the new service execution unit;
when a confirmation instruction of the completion of editing is received, compiling and loading the source code of the new service execution unit to create the new service execution unit.
In one embodiment, the obtaining path information of the storage service data uploaded by the third-party server and analyzing the path information includes:
and acquiring the path information uploaded to the SFTP server by the third-party server from the SFTP server.
An apparatus for processing traffic data, the apparatus comprising:
the analysis module is used for acquiring path information of the storage service data uploaded by the third-party server and analyzing the path information;
the encapsulation module is used for acquiring the service data according to the analyzed path information and encapsulating the service data to obtain a service entity;
the extraction module is used for extracting the service type of the service entity and determining a data table matched with the service type in a preset database according to the service type;
the data conversion module is used for performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table and pulling the converted service data into the data table;
and the service processing module is used for calling the corresponding service execution unit according to the data table so as to process the service corresponding to the service data to obtain a processing result and transmitting the processing result back to the third-party server.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the above-described embodiment methods when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the business data processing method, the business data processing device, the computer equipment and the storage medium, the path information of the stored business data uploaded by the third-party server is obtained, and the path information is analyzed; acquiring the service data according to the analyzed path information, and packaging the service data to obtain a service entity; extracting the service type of the service entity, and determining a data table matched with the service type in a preset database according to the service type; performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table; and calling a corresponding service execution unit according to the data table to process the service corresponding to the service data to obtain a processing result, and transmitting the processing result back to the third-party server. According to the method and the device, the acquired business data of each partner are converted into the unified data model through the path information analysis of the storage path and the conversion of the data format, different butt joint schemes do not need to be adopted for different partners and business data of different data formats, the scheme is simple, and the butt joint efficiency with the partners is improved.
Drawings
Fig. 1 is an application environment diagram of a service data processing method in an exemplary embodiment of the present application;
fig. 2 is a schematic flowchart of a method for processing service data according to an exemplary embodiment of the present application;
fig. 3 is a block diagram of a service data processing apparatus provided in an exemplary embodiment of the present application;
fig. 4 is an internal structural diagram of a computer device provided in an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
In the application, a business processing server in an enterprise acquires business data uploaded by a third-party server corresponding to a partner of the enterprise cooperation, and encapsulates the business data to obtain a business entity; and acquiring a data table in a preset database according to the service entity, pulling the service data into the data table, processing the corresponding service according to the data table to obtain a processing result, and then transmitting the processing result back to the third-party server.
Fig. 1 is an application environment schematic diagram of a service data processing method according to an exemplary embodiment of the present application. As shown in fig. 1, the method for processing service data is applied to a service data processing system, which includes a service processing server 100 and a third-party server.
The service processing server 100 is configured to obtain service data uploaded by the third-party server 101, perform data encapsulation on the service data to obtain a service entity, pull the service data corresponding to the service entity into a data table of a corresponding preset database, process a service in the data table to obtain a processing result, and transmit the processing result back to the third-party server 101. The server 100 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
The third-party server 101 is configured to transmit the service data to the service processing server 100, so that the service processing server processes the service data. The third party server 101 may be implemented as a stand-alone server or as a server cluster of multiple servers.
The network 102 is used to implement network connection between the service processing server 100 and the third-party server 101. Specifically, the third-party server transmits the service data to the service processing server 100 through the network 102, and the service processing server processes the service data and then transmits a processing result back to the third-party server 101.
In an embodiment, as shown in fig. 2, a method for processing service data is provided, which is described by taking the method as an example applied to the service processing server in fig. 1, and includes the following steps:
s11, obtaining path information of the storage service data uploaded by the third-party server, and analyzing the path information.
Specifically, the service processing server in the application is a server used for interfacing various services and processing service data corresponding to the various services in an enterprise. The third-party server is a server corresponding to a partner of the enterprise.
In the present application, the service data is data related to services uploaded by each partner. In a possible application scenario, the partner may be a bank, and the service data may be service data corresponding to the union pay service sent by each bank server, such as service data related to the paid membership opening service, the credit exchange service, and the union pay card opening service. For example, the service data of the card opening service includes but is not limited to: the user name of the client, the identity card information of the client, the address information of the client, the highest transfer amount and the like.
In the application, the service data is stored in the service file, and the service file is stored in different path information. Since the service files of different partners are stored in different path information, the path information of the service files of different partners needs to be analyzed to obtain the service files uploaded by the partners, wherein the path information specifically includes but is not limited to: pull path, receipt path, archive path, etc.
And S12, acquiring service data according to the analyzed path information, and packaging the service data to obtain a service entity.
In the method and the device, path information uploaded by a third party is acquired, and the path information stores business data. Specifically, the service file is stored under the path information, and the service file includes service data. After the application acquires the path information, the path information can be analyzed, the service file is acquired from the analyzed path information, and the service data in the service file is further acquired.
In the application, the service processing server analyzes the path information, and encapsulates the service data after acquiring the service data to obtain the service entity.
And S13, extracting the service type of the service entity, and determining a data table matched with the service type in the preset database according to the service type.
In the present application, a service entity includes a plurality of entity fields and values of the entity fields. Including the entity field of the service type. Therefore, after the business entity is created, the business type can be extracted from the entity field of the business entity, and the business type is matched with the mapping relation between the data table in the preset database and the business type to obtain the data table matched with the business entity.
And S14, performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table.
In the present application, the data table has a preset data format, and specifically includes formats such as the number of fields, the meaning of each field, separators between fields, and data types. However, the data formats of the service data of different partners are different, and therefore, the service data of each partner needs to be converted into the preset data format in the data table by the file converter and then stored in the data table. In the application, the file converter is further configured to convert the processing result into a format required by each partner and then transmit the format back to the third-party server corresponding to each partner.
And S15, calling the corresponding service execution unit according to the data sheet to process the service corresponding to the service data to obtain a processing result, and transmitting the processing result back to the third-party server.
In the application, the service processing server calls one or more service execution units according to the data table, splices the one or more service execution units, and calls the service of the spliced service execution unit processing unit to obtain a processing result.
Furthermore, the service processing server converts the processing result according to the specified format and then transmits the converted processing result back to the third-party server.
In one embodiment, the obtaining the path information of the storage service data uploaded by the third-party server and analyzing the path information includes:
and acquiring the path information uploaded to the SFTP server by the third-party server from the SFTP server. In the application, when the third-party server transmits the service data to the service processing server, the service data is stored in an SFTP (secure file transfer protocol) server in a DMZ (isolation) area, and the service processing server pulls the service data from the SFTP server and processes the service data by calling an RSF (remote service framework) interface. Among them, RSF aims to solve the problem of service call between systems, and provides a transparent and high-performance RPC (remote procedure) service call scheme.
In one embodiment, the obtaining service data according to the analyzed path information, and encapsulating the service data to obtain a service entity includes: acquiring a service file containing service data from the analyzed path information; analyzing the file name and the file format of the service file; extracting service data from the analyzed service file; checking the service data; and setting the checked service data into the value of the entity field contained in the entity to create the service entity containing a plurality of entity fields.
In the present application, the service data is included in a service file, and the service file is stored in the path information. The service processing server obtains the path information, analyzes the path information to obtain the service file, analyzes the service file, and extracts the service data from the analyzed service file.
In this application, the service data that passes the verification is set to the value of the entity field contained in the entity to create a service entity containing a plurality of entity fields, which specifically includes:
dividing the service data by separators to obtain a plurality of target fields and values of the fields; and correspondingly setting the value of the target field into the value of the entity field of the service entity to create the service entity comprising a plurality of entity fields.
In the application, the path information and the service file are analyzed through the rule analyzer, further, the analyzed service data is verified through the data verifier, and the service entity is obtained by performing data encapsulation on the service data passing verification through the entity creator. The method and the device realize the analysis of the service data of different path information and different protocols through the rule analyzer to obtain the required service data, and utilize the uniform interface to connect the service data of different partners to obtain the uniform data format to be the basis for subsequent data processing.
Specifically, the third-party server uploads service files containing service data to the SFTP server, where one service corresponds to one service file, that is, a rule agreed in advance between the third-party server and the service server is as follows: a service file contains service data related to a service. And uploading the service files corresponding to different partners to different paths in the SFTP server, wherein the path information of different service files of the same partner is different. For example, the path information of the business file of the big optical bank is the a path in the SFTP server, and the path information of the business file of the transportation bank is the B path in the SFTP server. When the third-party server corresponding to the large optical bank uploads two service files which are respectively the card opening service file and the point conversion service file to the SFTP server, the path information of the two service files is respectively an A1 path and an A2 path under the A path.
Further, the rule parser parses each path information, acquires the service file from the parsed path information, extracts the service data therein, and simply converts the data format of the service data into the required data format.
In particular, the rule parser may be implemented by program code. In the application, the path information of the storage paths of the service files of different partners is different, and the file names and file types of the service files defined by each partner are different, and some specific files need to be converted into the required file types. Therefore, different path information, file conversion formats, file types and the like can be analyzed through the rule parser. The method also supports some self-defined symbols and grammars, and can analyze characters at any position and in any number on the file name to obtain the data type which can be processed by the method for processing the service data. The method and the device can realize the primary unification of the data formats of the service data through the rule parser and make a foundation for subsequent data processing.
Further, the data checker may be implemented by program code. The data checker can perform a series of verifications of uniform format, length, encryption and decryption, mandatory filling and the like on the business data transmitted by each partner, and prevent business data which affects normal business execution or system safety from entering the steps of business logic processing. In the application, exception handling, such as error reporting, is performed in advance for unsafe service data. The data checker is used as a processor of the service data processing method in the application, so that the data security and the legality are guaranteed, and the normal service operation of the whole data processing flow is guaranteed.
Further, the entity creator may be implemented by program code. The entity creator encapsulates the service data into an object, and is a bridge for data communication between the SFTP server and the preset database in the application. Since the data table transmitted by each service is different, the corresponding entity creators are different. In the application, the corresponding service type is determined through the service data, and the service entity is dynamically established according to the service type, so that a basis is provided for subsequent data conversion.
Furthermore, an entity can be created for the service data in one service file through the entity creator, different service entities are created for different service files, and one service file corresponds to one service, so that one service entity actually describes a parameter corresponding to one service.
Specifically, the service entity includes a plurality of entity fields and values of the entity fields. For example, entity fields and values thereof that may be included in a service entity of the card opening service are respectively: the service type, the corresponding value is: opening the card; the user name, the corresponding value is: zhang III; the highest transfer amount takes the value as: 1 ten thousand, etc. In the application, after the business entity is created for the business data, the business data in the business entity is mapped to the data table in the preset database correspondingly.
In one embodiment, the extracting the service type of the service entity and determining a data table matching the service type in a preset database according to the service type includes: extracting the service type of the service entity from the entity field; and acquiring a data table matched with the service type of the service entity according to the mapping relation between the service type in the preset database and the data table.
In the application, a preset database is created in advance, and a plurality of data tables and mapping relations between the data tables and the service types are created in advance in the database. The service type of the service entity is matched with the service type corresponding to the data table, and the service data is converted into the data table according to the matching result. In the application, the data table is equivalent to a template for data storage, and business data in different data formats are converted into the data format and the data type specified in the data table through data conversion, so that the unification of the data format and the data type is realized.
In the present application, a service entity includes a plurality of entity fields and values of the entity fields. Including the entity field of the service type. Therefore, after the business entity is created, the business type can be extracted from the entity field of the business entity, and the business type is matched with the mapping relation between the data table in the preset database and the business type to obtain the data table matched with the business entity.
In the application, a preset database is constructed in advance, and the database comprises a plurality of data tables and mapping relations between the data tables and the service types. The data table includes a number of reference fields. In one possible design, the mapping relationship between the data table and the service type is shown in table 1 below:
table 1 in one embodiment, a table of mapping relationships between data tables and service types
Data table ID Type of service
ID1 Card opening service
ID2 Point exchange business
ID3 Member charging service
As shown in table 1, the mapping relationship table between the data table and the service type includes a one-to-one correspondence relationship between the service type and the data table. The ID of the data table corresponding to the card opening service is ID1; the ID of a data table corresponding to the point exchange service is ID2; and the ID of the data table corresponding to the opening service of the paid member is ID3.
In one embodiment, the pulling the service data corresponding to the service entity into the data table includes: extracting each entity field in the service entity; matching each entity field in the service entity with each reference field in the data table; and pulling the service data in the service entity into a data table according to the matching result.
For example, if the service entity includes an entity field "user name" and the value is "zhang san", the reference field "user name" is found in the data table corresponding to the service entity, and "zhang san" is written into the field value corresponding to the "user name" in the data table.
The data type conversion of the service data is realized through the data table, the service data of different protocols and different data types are converted into the unified model so that the subsequent service execution node can execute the corresponding service conveniently, different butt joint schemes do not need to be adopted aiming at different partners and different types of service data, the scheme is simple, and the butt joint efficiency with the partners is improved.
In one embodiment, the data table includes identification information of a partner to which the third-party server belongs, and the processing of the service corresponding to the service data according to the data table to obtain the processing result includes: acquiring the data type of the data table and the identification information of a partner to which the third-party server belongs from the data table; acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type and the identification information of the data table; assembling one or more service execution units according to an execution sequence to generate a service unit execution group; calling a service unit to execute a service corresponding to the group processing service data to obtain a processing result; and returning the processing result to the third-party server.
In the application, a node configuration table is preset, the node configuration table includes service execution units corresponding to identification information and service types of each partner, and the node configuration table further includes execution sequences of the service execution units. Specifically, the corresponding service execution units and the execution sequence of each service execution unit can be accurately obtained from the node configuration table according to the identification information of the partner and the service type. In one possible design, the data structure of the node configuration table is shown in table 2 below:
table 2 node configuration table in one embodiment
Figure BDA0002218297140000121
As shown in table 2, the node configuration table includes the identifier information of the partner and the mapping relationship between the service type and the service execution node and the execution order thereof. When the currently docked card opening service uploaded by the optical banking system is the card opening service, according to table 2, the service execution units corresponding to the service can be acquired as a service execution unit a, a service execution unit B, and a service execution unit C, and further, the execution sequence of each service execution unit can be acquired as follows: the service execution unit A, the service execution unit B and the service execution unit C.
In the application, the number of service execution units to be called for processing the service corresponding to one service file is one or more. When a plurality of service execution units need to be called, the service execution units need to be spliced and assembled according to the execution sequence to obtain a service execution unit group, and finally, the service execution unit group is called to execute the corresponding service.
Further, the data table of the present application includes a field for characterizing identification information of a partner to which the third-party server belongs. For a data table in which the service data corresponding to the service entity has been pulled, the identification information of the partner corresponding to the service entity may be obtained.
In the application, the corresponding service is executed through the service executor. The service executor may be implemented by program code. The service executor is used as a core component, is composed of a plurality of service execution units, and is mainly used for executing core service functions. Each execution unit only executes the business logic of the execution unit and is isolated from other execution units.
In practical applications, each service execution unit may be assembled, or a member in the assembled service execution unit group may be modified, for example, an operation such as deleting a certain service execution unit in the service execution unit group or adding a new service execution unit to a certain service execution unit group is performed. In business needs, different partners may have the same cooperative business, for example, the smooth bank, the promissory bank and the traffic bank all have the first business of opening super members, and these businesses of different banks may have the same general flow but different details. For the common property of the business, a plurality of execution units can be directly assembled in a serial or parallel mode, the difference among the same business can be expanded by increasing business execution nodes, and the business can be assembled and operated in real time through a background after expansion, so that the business function is realized.
When the operation of adding a service execution unit to a service execution unit group is performed, the following two situations are generally included:
firstly, a new service execution unit can be formed after the completion of the writing of the differential codes in the project. According to business requirements, selecting a position to be plugged and unplugged, and inserting a corresponding function into an appointed running position through a static compiling and loading mode to complete function expansion. The execution sequence of each execution unit can be directly configured through the background.
Specifically, the historical business processes of all the business types are analyzed, and the same processes and different processes among the business processes corresponding to all the business types are obtained. And directly multiplexing the same service execution unit for the same process, and respectively writing different codes for different processes to form a newly added service execution unit. When the relevant service is executed, the newly added service execution unit can be embedded into a required position, and a plurality of service execution units are assembled to form a calling chain for calling so as to realize function expansion.
For example, the light bank, the issuing bank, and the transit bank have businesses that first swipe on super members. The business of first-time-swiping super members corresponding to the OpenBank, the Pursou bank and the transportation bank has a common part in the business process, and the same execution units are reused for calling aiming at the common part. Furthermore, the business of the light bank for swiping super members at the head and the business of other banks for swiping super members at the head have a difference part in the flow, and a set of newly added code business execution units is compiled aiming at the difference part. When the first super member swiping service of the big-end optical bank is connected, the newly added service execution unit is embedded into a required position, and a plurality of service execution units are assembled to form a calling chain for calling so as to execute the first super member swiping service of the big-end optical bank.
Secondly, the method and the device can also provide a mechanism for instantly compiling codes, when the service execution unit needs to be newly added, the codes corresponding to the newly added service execution unit can be instantly compiled, and after the codes are compiled, the codes can be directly dynamically compiled and loaded into a container, and the codes can be obtained by reflection technology when the functions of the containers are used. When the device is not needed to be used, the device can be deleted or replaced at any time, and the dynamic pluggable performance of the device is met. The operation of deleting or replacing the service execution unit can be immediately effective without stopping the machine, and the hot repair is satisfied. Meanwhile, the operation in the mode reduces the volume of the execution file, accelerates the compiling speed and saves system resources.
In one embodiment, the method further comprises receiving a request to create a new service execution unit; responding to a request for creating a new service execution unit, and displaying an editing interface of a source code of the new service execution unit; when a confirmation instruction of the completion of editing is received, the source code of the new service execution unit is compiled and loaded to create the new service execution unit.
When a new service execution unit is needed, a user can trigger an instruction for instantly compiling the code through a virtual key on an interface, the interface displays an edit box for editing the source code, and when a confirmation instruction for finishing editing is received, the written code is automatically and dynamically compiled.
In one embodiment, the processing the service corresponding to the service data according to the data table to obtain the processing result includes:
converting the processing result into a target file according to a preset file conversion rule, wherein the preset file conversion rule is a file conversion rule corresponding to the identification information of the partner to which the third-party server belongs; and returning the target file to the SFTP server so that the third-party server can obtain the target file from the SFTP server.
In the application, the service data uploaded to the SFTP server by the third-party server can be acquired from the SFTP server, and finally, the processing result is transmitted back to the SFTP server so as to be acquired by the third-party server. The SFTP is used as a data transmission medium to provide a safe encryption method for data transmission, and the safety in the data transmission process is improved.
The mapping relation between the identification information of each partner and the file conversion rule is stored in advance in the application. Because the file formats required by all the partners are different and the data types are different, when the business data are acquired and converted into the formats required by the business processing servers, the mapping relation between the identification information of all the partners and the file conversion rules is also constructed and stored, so that the processing results are converted according to the rules required by all the partners and then are transmitted back to the third-party servers corresponding to all the partners.
In the application, the processing result is converted into the target file by the service observer. The service watcher is implemented by program code. The service observer is a component which passively receives the message, and can inform the service observer in a broadcasting mode after the whole service logic processing is finished, and the service observer can execute the subsequent service after receiving the notification. At present, a service observer is mainly used for splicing processing results required by a preset database according to a preset file conversion rule and then transmitting the spliced processing results to an SFTP server, so that a third-party server corresponding to a partner can pull the processing results.
In one embodiment, the method further includes establishing an association relationship between identification information of a partner to which each third-party server belongs and a corresponding service to be executed. Specifically, when the service processing server obtains service data of a plurality of services to be executed of a plurality of partners, a service number is set for each service, and the identification information of the partners and the service numbers are stored in association, and the corresponding services to be executed can be queried through the identification information of the partners subsequently. Meanwhile, the processing condition of the service to be executed of each partner can be conveniently related and inquired in the system background.
In one embodiment, as shown in fig. 3, there is provided a service data processing apparatus, including:
the analysis module 11 is configured to acquire path information of the storage service data uploaded by the third-party server and analyze the path information;
the encapsulation module 12 is configured to obtain service data according to the analyzed path information, and encapsulate the service data to obtain a service entity;
the extraction module 13 is used for extracting the service type of the service entity and determining a data table matched with the service type in a preset database according to the service type;
the data conversion module 14 is configured to perform data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pull the converted service data into the data table;
and the service processing module 15 is configured to call the corresponding service execution unit according to the data table, so as to process the service corresponding to the service data to obtain a processing result, and return the processing result to the third-party server.
In one embodiment, the package module 11 includes:
the packaging unit is used for acquiring a service file containing service data from the analyzed path information;
analyzing the file name and the file format of the service file;
extracting service data from the analyzed service file; checking the service data;
and setting the checked service data into the value of the entity field contained in the entity to create the service entity containing a plurality of entity fields.
In one embodiment, the extracting module 13 includes:
an extracting unit, configured to extract a service type of a service entity from an entity field;
and acquiring a data table matched with the service type of the service entity according to the mapping relation between the service type in the preset database and the data table.
In one embodiment, the data conversion module 14 includes:
a conversion unit, configured to extract each entity field in a service entity;
matching each entity field in the service entity with each reference field in the data table;
and converting the data format of the service data in the service entity into the data format of the reference field according to the matching result, wherein the data format comprises but is not limited to:
the number of entity fields in the service entity, the meaning represented by the entity fields and separators among the entity fields;
and pulling the converted service data into a data table.
In one embodiment, the service processing module 15 includes:
the processing unit is used for acquiring the data type of the data table and the identification information of the partner to which the third-party server belongs from the data table;
acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type and the identification information of the data table;
assembling one or more service execution units according to an execution sequence to generate a service unit execution group;
calling a service unit to execute a service corresponding to the group processing service data to obtain a processing result;
and transmitting the processing result back to the third-party server.
In one embodiment, the service processing module 15 further includes:
a new adding unit for receiving a request for creating a new service execution unit;
responding to a request for creating a new service execution unit, and displaying an editing interface of a source code of the new service execution unit;
when a confirmation instruction of the completion of editing is received, the source code of the new service execution unit is compiled and loaded to create the new service execution unit.
In one embodiment, the parsing module includes:
and the acquisition unit is used for acquiring the path information uploaded to the SFTP server by the third-party server from the SFTP server.
In one embodiment, a computer device is provided, which may be a service processing server, and the internal structure diagram thereof may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of processing business data. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring path information of storage service data uploaded by a third-party server, and analyzing the path information; acquiring service data according to the analyzed path information, and packaging the service data to obtain a service entity; extracting the service type of the service entity, and determining a data table matched with the service type in a preset database according to the service type; performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table; and calling the corresponding service execution unit according to the data sheet so as to process the service corresponding to the service data to obtain a processing result, and returning the processing result to the third-party server.
In an embodiment, when the processor executes the computer program to implement the steps of obtaining the service data according to the analyzed path information, and encapsulating the service data to obtain the service entity, the following steps are specifically implemented: acquiring a service file containing service data from the analyzed path information; analyzing the file name and the file format of the service file; extracting service data from the analyzed service file; checking the service data; and setting the checked service data into the value of the entity field contained in the entity to create the service entity containing a plurality of entity fields.
In one embodiment, when the processor executes a computer program to implement the step of extracting the service type of the service entity and determining the data table matched with the service type in the preset database according to the service type, the following steps are specifically implemented: extracting the service type of the service entity from the entity field; and acquiring a data table matched with the service type of the service entity according to the mapping relation between the service type in the preset database and the data table.
In one embodiment, the processor executes a computer program to realize data conversion of service data corresponding to the service entity according to a preset data format in a data table, and when the converted service data is pulled into the data table, the following steps are specifically realized: extracting each entity field in the service entity; matching each entity field in the service entity with each reference field in the data table; and converting the data format of the service data in the service entity into the data format of the reference field according to the matching result, wherein the data format comprises but is not limited to: the number of entity fields in the service entity, the meaning represented by the entity fields and separators among the entity fields; and pulling the converted service data into a data table.
In one embodiment, the data table includes identification information of a partner to which the third-party server belongs, and the processor executes the computer program to implement the following steps when processing a service corresponding to the service data according to the data table to obtain a processing result: acquiring the data type of the data table and the identification information of a partner to which the third-party server belongs from the data table; acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type and the identification information of the data table; assembling one or more service execution units according to an execution sequence to generate a service unit execution group; calling a service unit to execute a service corresponding to the group processing service data to obtain a processing result; and returning the processing result to the third-party server.
In one embodiment, the processor, when executing the computer program, performs the steps of: receiving a request for creating a new service execution unit; responding to a request for creating a new service execution unit, and displaying an editing interface of a source code of the new service execution unit; when a confirmation instruction of editing completion is received, the source code of the new service execution unit is compiled and loaded to create the new service execution unit.
In an embodiment, when the processor executes the computer program to implement the above-mentioned step of obtaining the path information of the storage service data uploaded by the third-party server and analyzing the path information, the following steps are specifically implemented: and acquiring the path information uploaded to the SFTP server by the third-party server from the SFTP server.
It will be appreciated by those skilled in the art that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, realizes the steps of the method for processing service data in any one of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A method for processing service data, the method comprising:
acquiring path information of storage service data uploaded by a third-party server, and analyzing the path information;
acquiring the service data according to the analyzed path information, and packaging the service data to obtain a service entity;
extracting the service type of the service entity, and determining a data table matched with the service type in a preset database according to the service type;
performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table;
the data table comprises identification information of a partner to which the third-party server belongs, and the service type of the data table and the identification information of the partner to which the third-party server belongs are obtained from the data table;
acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type of the data table and the identification information;
assembling the one or more service execution units according to the execution sequence to generate a service unit execution group, wherein when a plurality of service execution units are obtained for assembly, service execution units corresponding to the same or different service types are obtained for assembly;
calling the service unit execution group to process the service corresponding to the service data to obtain a processing result;
and returning the processing result to the third-party server.
2. The method of claim 1, wherein the obtaining the service data according to the analyzed path information, and encapsulating the service data to obtain a service entity comprises:
acquiring a service file containing the service data from the analyzed path information;
analyzing the file name and the file format of the service file;
extracting the service data from the analyzed service file;
checking the service data;
and setting the checked service data into the value of the entity field contained in the entity to create the service entity containing a plurality of entity fields.
3. The method of claim 2, wherein the extracting the service type of the service entity and determining a data table in a preset database matching the service type according to the service type comprises:
extracting the service type of the service entity from the entity field;
and acquiring a data table matched with the service type of the service entity according to the mapping relation between the service type in the preset database and the data table.
4. The method according to claim 2, wherein the performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table, and pulling the converted service data into the data table includes:
extracting each entity field in the service entity;
matching each entity field in the service entity with each reference field in the data table;
converting the data format of the service data in the service entity into the data format of the reference field according to the matching result, wherein the data format comprises any one or more of the following items: the number of entity fields in the business entity, the meaning represented by the entity fields and separators among the entity fields;
and pulling the converted service data into the data table.
5. The method of claim 1, further comprising:
receiving a request for creating a new service execution unit;
responding to the request for creating the new service execution unit, and displaying an editing interface of the source code of the new service execution unit;
when a confirmation instruction of the completion of editing is received, compiling and loading the source code of the new service execution unit to create the new service execution unit.
6. The method according to claim 1, wherein the obtaining path information of the storage service data uploaded by the third-party server and analyzing the path information comprises:
and acquiring the path information uploaded to the SFTP server by the third-party server from the SFTP server.
7. An apparatus for processing traffic data, the apparatus comprising:
the analysis module is used for acquiring path information of the storage service data uploaded by the third-party server and analyzing the path information;
the encapsulation module is used for acquiring the service data according to the analyzed path information and encapsulating the service data to obtain a service entity;
the extraction module is used for extracting the service type of the service entity and determining a data table matched with the service type in a preset database according to the service type;
the data conversion module is used for performing data conversion on the service data corresponding to the service entity according to a preset data format in the data table and pulling the converted service data into the data table;
the service processing module is used for acquiring the service type of the data table and the identification information of the partner to which the third-party server belongs from the data table, wherein the data table comprises the identification information of the partner to which the third-party server belongs; acquiring one or more service execution units corresponding to the service entity and an execution sequence of the one or more service execution units from a preset node configuration table according to the service type of the data table and the identification information; assembling the one or more service execution units according to the execution sequence to generate a service unit execution group, wherein when a plurality of service execution units are obtained for assembly, service execution units corresponding to the same or different service types are obtained for assembly; calling the service unit execution group to process the service corresponding to the service data to obtain a processing result; and transmitting the processing result back to the third-party server.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for processing service data according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of processing traffic data of any one of claims 1 to 6.
CN201910923463.8A 2019-09-25 2019-09-25 Service data processing method and device, computer equipment and storage medium Active CN110765102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910923463.8A CN110765102B (en) 2019-09-25 2019-09-25 Service data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910923463.8A CN110765102B (en) 2019-09-25 2019-09-25 Service data processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110765102A CN110765102A (en) 2020-02-07
CN110765102B true CN110765102B (en) 2022-11-08

Family

ID=69330677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910923463.8A Active CN110765102B (en) 2019-09-25 2019-09-25 Service data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110765102B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506559B (en) * 2020-04-21 2024-04-05 北京同邦卓益科技有限公司 Data storage method, device, electronic equipment and storage medium
CN112291240B (en) * 2020-10-29 2023-05-09 国网汇通金财(北京)信息科技有限公司 An information processing method and device
CN112464625B (en) * 2020-11-30 2024-03-29 金蝶云科技有限公司 Document generation method, device, computer equipment and storage medium
CN113449948B (en) * 2020-12-31 2024-05-03 北京新氧科技有限公司 Business processing method, device, electronic equipment and medium
CN112732763B (en) * 2021-01-20 2024-11-19 北京千方科技股份有限公司 Data aggregation method, device, electronic device and medium
CN112905635A (en) * 2021-03-11 2021-06-04 深圳市分期乐网络科技有限公司 Service processing method, device, equipment and storage medium
CN112860706A (en) * 2021-03-11 2021-05-28 深圳鼎盛电脑科技有限公司 Service processing method, device, equipment and storage medium
CN113032398B (en) * 2021-03-26 2022-12-13 苏宁易购集团股份有限公司 Service processing method, computer equipment and storage medium for multi-type service
CN113489773B (en) * 2021-06-30 2022-11-04 未鲲(上海)科技服务有限公司 Data access method, device, equipment and medium
CN113835786B (en) * 2021-09-30 2023-04-28 四川新网银行股份有限公司 Data docking system, method and computer readable storage medium
CN115017118B (en) * 2022-06-01 2024-08-09 深圳鳍源科技有限公司 Job data recording method, device, equipment and storage medium
CN115660597A (en) * 2022-11-08 2023-01-31 平安银行股份有限公司 Method and system for submitting business data
CN116167858A (en) * 2023-02-15 2023-05-26 中电金信软件有限公司 Business processing method, device, system and electronic device
CN119211355A (en) * 2024-09-19 2024-12-27 中国联合网络通信集团有限公司 Business data adjustment method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179766A (en) * 2007-12-13 2008-05-14 中兴通讯股份有限公司 Method and system for implementing service data sharing
US8229946B1 (en) * 2009-01-26 2012-07-24 Sprint Communications Company L.P. Business rules application parallel processing system
CN103577614A (en) * 2013-11-07 2014-02-12 浙江中烟工业有限责任公司 Data acquisition method and system oriented to SAP PI application integration platform
CN106875156A (en) * 2017-02-14 2017-06-20 电子科技大学 A kind of generalization intelligent checks platform and its checking method
CN109785092A (en) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 Accounting voucher generates management method, device and computer equipment, storage medium
CN109800965A (en) * 2018-12-28 2019-05-24 广州亚信技术有限公司 Traffic flow processing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179766A (en) * 2007-12-13 2008-05-14 中兴通讯股份有限公司 Method and system for implementing service data sharing
US8229946B1 (en) * 2009-01-26 2012-07-24 Sprint Communications Company L.P. Business rules application parallel processing system
CN103577614A (en) * 2013-11-07 2014-02-12 浙江中烟工业有限责任公司 Data acquisition method and system oriented to SAP PI application integration platform
CN106875156A (en) * 2017-02-14 2017-06-20 电子科技大学 A kind of generalization intelligent checks platform and its checking method
CN109785092A (en) * 2018-12-10 2019-05-21 平安科技(深圳)有限公司 Accounting voucher generates management method, device and computer equipment, storage medium
CN109800965A (en) * 2018-12-28 2019-05-24 广州亚信技术有限公司 Traffic flow processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110765102A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
CN110765102B (en) Service data processing method and device, computer equipment and storage medium
CN108804140B (en) Batch instruction analysis method, device and equipment
KR102209737B1 (en) Methods and systems for providing verifiable, auditable, and immutable inputs to smart contracts
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
CN110413507B (en) System test method, device, computer equipment and storage medium
WO2021036447A1 (en) Flink engine-based service data processing method and apparatus
CN113612766B (en) Data management device, method, computer equipment and storage medium
CN105791178B (en) Message assemble method and device
CN113742235B (en) Method and device for verifying code
CN110880146A (en) Block chain chaining method, device, electronic equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN109408247A (en) Interaction data processing method and device
CN111078260A (en) Method and system for third-party platform management of WeChat applet
CN113360365A (en) Flow testing method and flow testing system
CN114531289A (en) System interaction method based on artificial intelligence and related equipment
CN115964684A (en) Method, system, device and medium for detecting authenticity of metadata of electronic file
CN112417178A (en) On-chain contract processing method and device based on document template definition and electronic equipment
CN111324645B (en) Block chain data processing method and device
CN113901773B (en) Data accounting method, device, electronic equipment and storage medium
CN114648012A (en) A bill processing method, device, electronic device and computer readable medium
US11909858B1 (en) System and method for generating and performing a smart contract
CN115334145B (en) Service processing method and device, electronic equipment and storage medium
CN115357443A (en) Interface test method and device
CN116126819A (en) System log processing method, device and 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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210000

Patentee after: Jiangsu Suning cloud computing Co.,Ltd.

Country or region after: China

Address before: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210000

Patentee before: Suning Cloud Computing Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20240315

Address after: 210000, 1-5 story, Jinshan building, 8 Shanxi Road, Nanjing, Jiangsu.

Patentee after: SUNING.COM Co.,Ltd.

Country or region after: China

Address before: No.1-1 Suning Avenue, Xuzhuang Software Park, Xuanwu District, Nanjing, Jiangsu Province, 210000

Patentee before: Jiangsu Suning cloud computing Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载