CN109361628B - Message assembling method and device, computer equipment and storage medium - Google Patents
Message assembling method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109361628B CN109361628B CN201811204617.XA CN201811204617A CN109361628B CN 109361628 B CN109361628 B CN 109361628B CN 201811204617 A CN201811204617 A CN 201811204617A CN 109361628 B CN109361628 B CN 109361628B
- Authority
- CN
- China
- Prior art keywords
- message
- rule set
- information
- set template
- interface
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
- H04L49/3009—Header conversion, routing tables or routing tags
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9057—Arrangements for supporting packet reassembly or resequencing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The present application relates to a processing technology for optimizing a business process, and in particular, to a method and an apparatus for assembling a packet, a computer device, and a storage medium. The method comprises the following steps: acquiring input key information corresponding to a service to be processed; selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a local data source and the change of an interface of the third-party cooperation system; according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from the local data source; converting the native data value according to the data conversion information configured in the message rule set template; and according to message assembly information configured in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed. By adopting the method, the message meeting the requirement of the third-party cooperative system can be quickly and effectively assembled.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for packet assembly, a computer device, and a storage medium.
Background
At present, a bank asset end system can develop loan businesses such as bank card verification, loan order pushing and the like through a front platform system and a third-party cooperation system, and most of the businesses are completed in a mode of receiving and sending messages through a synchronous interface. In the process of connecting different third-party cooperative systems, the message structures, field names, code values, message contents, encoding modes and the like of the different third-party cooperative systems are different.
After the asset end system is iteratively upgraded, the original data source of the asset end system has logic change, and in addition, the interface with the third-party cooperation system may be frequently adjusted, so that the assembly of the message is affected, and the message meeting the requirements of the third-party cooperation system cannot be quickly and effectively assembled.
Disclosure of Invention
Therefore, it is necessary to provide a message assembling method, apparatus, computer device and storage medium to achieve fast and efficient assembling of a message meeting the requirements of a third-party cooperative system.
A method of message assembly, the method comprising:
acquiring input key information corresponding to a service to be processed;
selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a data source and the change of an interface of the third-party cooperation system;
according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from the local data source;
converting the native data value according to the data conversion information configured in the message rule set template;
and according to message assembly information configured in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed.
In one embodiment, the converting, according to the data conversion information configured in the message rule set template, a native data value includes:
judging whether to convert the native data value according to the message rule set template;
if so, determining the data format requirement of the third-party cooperative system according to the data conversion information;
and converting the native data values into data values meeting the data format requirements of the third-party cooperative system.
In one embodiment, the method further comprises:
when the data source is logically changed, acquiring first interface information corresponding to the changed data source;
updating interface configuration information in the message rule set template according to the first interface information;
the searching for the native data value corresponding to the key information from the local data source according to the interface configuration information configured in the message rule set template includes:
selecting a local data source according to the updated interface configuration information in the message rule set template;
and searching a native data value corresponding to the key information from the selected local data source.
In one embodiment, the method further comprises:
judging whether the assembled message meets the requirements of a test template or not by a message test tool; the test template is a template carried in the test tool and corresponding to the message rule set template;
if so, determining that the message meets the message requirement of the third-party cooperative system;
if not, determining that the message does not meet the message requirement of the third-party cooperative system.
In one embodiment, the method further comprises:
detecting second interface information of the third-party cooperative system;
when the interface of the third-party cooperative system is determined to be changed according to the second interface information, the third-party cooperative system is started to operate
Acquiring first message information corresponding to the third-party cooperative system;
and modifying the message assembly information of the message rule set template according to the first message information.
In one embodiment, the method further comprises:
detecting whether a new third-party cooperative system is accessed to the local system;
if so, acquiring second message information corresponding to the new third-party cooperative system;
and creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
A message assembly apparatus, the apparatus comprising:
the key information acquisition module is used for acquiring input key information corresponding to the service to be processed;
the template selection module is used for selecting a message rule set template corresponding to the third-party cooperation system; the message rule set template is updated along with the logic change of a data source and the change of an interface of the third-party cooperation system;
a data value searching module, configured to search, according to interface configuration information configured in the message rule set template, a native data value corresponding to the key information from the local data source;
the data value conversion module is used for converting the native data value according to the data conversion information configured in the message rule set template;
and the message assembly module is used for assembling the converted native data values into messages corresponding to the service to be processed according to the message assembly information configured in the message rule set template.
In one embodiment, the data value conversion module is further configured to determine whether to convert a native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data values into data values meeting the data format requirements of the third-party cooperative system.
In one embodiment, the apparatus further comprises: the interface information acquisition module and the interface configuration information updating module; wherein:
the interface information acquisition module is used for acquiring first interface information corresponding to the changed data source when the data source is logically changed;
the interface configuration information updating module is used for updating the interface configuration information in the message rule set template according to the first interface information;
the data value searching module is also used for selecting a local end data source according to the updated interface configuration information in the message rule set template; and searching a native data value corresponding to the key information from the selected local data source.
In one embodiment, the apparatus further comprises: the device comprises a judging module and a determining module; wherein:
the judging module is used for judging whether the assembled message meets the requirements of the test template or not through the message testing tool; the test template is a template carried in the test tool and corresponding to the message rule set template;
the determining module is used for determining that the message meets the message requirement of the third-party cooperation system when the assembled message meets the requirement of the test template; and when the assembled message does not meet the requirement of the test template, determining that the message does not meet the message requirement of the third-party cooperation system.
In one embodiment, the apparatus further comprises: the device comprises an interface information detection module, a message assembly information acquisition module and a modification module; wherein:
the interface information detection module is used for detecting second interface information of the third-party cooperation system;
the message assembly information acquisition module is used for acquiring first message information corresponding to the third-party cooperative system when the interface of the third-party cooperative system is determined to be changed according to the second interface information;
and the modification module is used for modifying the message assembly information of the message rule set template according to the first message information.
In one embodiment, the apparatus further comprises: the system access detection module and the template creation module: wherein:
the system access detection module is used for detecting whether a new third-party cooperative system is accessed to the local system;
the message assembly information acquisition module is also used for acquiring second message information corresponding to a new third-party cooperative system when the fact that the new third-party cooperative system is accessed to the home terminal system is detected;
and the template creating module is used for creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring input key information corresponding to a service to be processed;
selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a data source and the change of an interface of the third-party cooperation system;
according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from the local data source;
converting the native data value according to the data conversion information configured in the message rule set template;
and according to message assembly information configured in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring input key information corresponding to a service to be processed;
selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a data source and the change of an interface of the third-party cooperation system;
according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from the local data source;
converting the native data value according to the data conversion information configured in the message rule set template;
and according to message assembly information configured in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed.
According to the message assembling method, the device, the computer equipment and the storage medium, the message rule set template is provided with the interface configuration information of the local data source, the data conversion information of the converted data value and the message assembling information of the assembled message, on one hand, when the key information corresponding to the service to be processed is obtained, the native data value can be rapidly obtained according to the message rule set template, the data value conversion is carried out, the converted native data value is assembled into the message corresponding to the service to be processed, and the rapid assembling of the message is realized; on the other hand, when the local data source is logically changed or the interface of the third-party cooperative system is changed, the message rule set template can be updated, so that the message is assembled according to the updated message rule set template, the assembly of the sound effect message caused by the change of the interfaces of the local data source and the third-party cooperative system can be avoided, and the message assembly efficiency is improved.
Drawings
FIG. 1 is a diagram of an application scenario of a message assembly method in an embodiment;
FIG. 2 is a flow diagram illustrating a method for assembling messages according to an embodiment;
FIG. 3 is a diagram illustrating obtaining native data values, in one embodiment;
FIG. 4 is a flow diagram illustrating message assembly in one embodiment;
FIG. 5 is a block diagram of a message assembly apparatus according to an embodiment;
FIG. 6 is a block diagram of a message assembling apparatus according to another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
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 the present application and are not intended to limit the present application.
The message assembling method provided by the application can be applied to the application environment shown in fig. 1. The server 102 acquires key information corresponding to the service to be processed, and searches a native data value corresponding to the key information from a local data source according to interface configuration information in a message rule set template; and converting the native data values according to the data conversion information in the message rule set template, assembling the converted native data values into a message corresponding to the service to be processed according to the message assembly information in the message rule set template, and then sending the assembled message to the service equipment 104 of the third-party cooperation system. Wherein the server 102 may be implemented by a single server or a server cluster composed of a plurality of servers. The service cluster 104 may be implemented with a single server or multiple servers, as well as terminals.
In an embodiment, as shown in fig. 2, a message assembling method is provided, which is described by taking the application of the method to the server 102 in fig. 1 as an example, and includes the following steps:
s202, key information corresponding to the to-be-processed service is acquired.
The key information may be a keyword or a corresponding number of the service to be processed, such as a service order number, a product number, or a customer identifier. The pending business can be the business of bank card verification, payment, loan order pushing, cash withdrawal and the like.
In one embodiment, when a consumer transacts a business, the consumer inputs information used by the business to be processed through a touch screen or other input devices, and the server receives the information corresponding to the business to be processed, which is input by a user, so that the server acquires corresponding key information from the received information. Or, the equipment of the third-party cooperative system receives the information corresponding to the service to be processed, which is input by the user, and sends the received information corresponding to the service to be processed to the server, so that the server acquires the corresponding key information from the received information.
And S204, selecting a message rule set template corresponding to the third-party cooperative system.
Wherein, the message rule set template is configured with: the interface configuration information used for searching the local data source, the data conversion information used for converting the data value, and the message assembly information used for assembling the message. The message rule set template is updated along with the logic change of the local data source or the change of the interface of the third-party cooperation system. The third party collaboration system may be a system of other banking institutions or third party payment institutions.
Because the message information such as the message structures, the field names, the code values and the like of different third-party cooperative systems are different, the interface of each third-party cooperative system can correspond to different message rule set templates so as to ensure that the assembled message meets the requirements of each third-party cooperative system.
Because the message rule set template is updated along with the logic change of the local data source or the change of the interface of the third-party cooperation system, S204 can be divided into the following two scenarios for discussion:
scene 1, when the local data source is logically changed, the message rule set template is updated.
In one embodiment, when a data source is logically changed, a server acquires first interface information corresponding to the changed data source; and updating the interface configuration information in the message rule set template according to the first interface information.
The logical change of the data source may be a change of a data structure of the data source, for example, the data source is stored in a service configuration file before the change, and is stored in a database after the change. In addition, since the data source can be stored in each subsystem of the home terminal system, the logical change of the data source can also be the change of the subsystem interface corresponding to the data source.
For example, when the subsystem interface of the storage data source changes, the server obtains first interface information of the changed subsystem interface, and updates interface configuration information in the message rule set template according to the first interface information, so that the updated interface configuration information corresponds to the updated subsystem interface.
And in a scene 2, updating the message rule set template when the interface of the third-party cooperative system is changed. In one embodiment, the method further comprises: detecting second interface information of a third-party cooperative system; when the interface of the third-party cooperation system is determined to be changed according to the second interface information, first message information corresponding to the third-party cooperation system is obtained; and modifying the message assembly information of the message rule set template according to the first message information.
When the third-party cooperative system is upgraded, the interface of the system may change, and the corresponding message information changes correspondingly, such as the message structure, the field name, the code value, and other message information changes.
Specifically, the server sends a message acquisition request to the third-party cooperative system when determining that the interface of the third-party cooperative system changes according to the second interface information of the third-party cooperative system, analyzes information such as a message structure, a field name and a code value of the first message information when receiving the first message information aiming at the message acquisition request, and modifies message assembly information of the message rule set template according to the analysis result. It should be noted that the two scenarios are two cases of updating the message rule set template independently from each other, and may occur sequentially or simultaneously. If the two scenes occur simultaneously, the interface configuration information and the message assembly information in the message rule set template can be updated simultaneously.
In addition, when a new third-party cooperative system accesses the local system, a new message rule set template can be created. In one embodiment, the method further comprises: detecting whether a new third-party cooperative system is accessed to the local system; if so, acquiring second message information corresponding to the new third-party cooperative system; and creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
Specifically, when a new third-party cooperative system is detected to be accessed to the home terminal system, the server sends a message acquisition request to the new third-party cooperative system, when second message information aiming at the message acquisition request is received, the information such as the message structure, the field name, the code value and the like of the second message information is analyzed, a message rule set template is created according to the analysis result, and corresponding message assembly information used for assembling the message is configured, so that when the third-party cooperative system is interacted, the corresponding message is generated according to the newly generated message rule set template.
In one embodiment, the server configures the message assembly information according to the message structure, field name and code value of the third-party cooperative system in the message rule set template. Therefore, when the interface of the third-party cooperative system changes, the message rule set template only needs to be modified according to the changed third-party cooperative system, namely, the information configured in the message rule set template for message assembly according to the message structure, the field name and the code value of the third-party cooperative system is changed, a new version does not need to be developed, and the working efficiency is improved.
Specifically, the step of selecting the message rule set template corresponding to the third-party collaboration system may specifically include: when message interaction with a third-party cooperation system is required, the template number of the message rule set template corresponding to the third-party cooperation system is obtained, and the corresponding message rule set template is searched according to the template number. And after the server selects the message rule set template, loading the rule set template into the memory.
S206, according to the interface configuration information in the message rule set template, searching a native data value corresponding to the key information from the local data source.
The interface configuration information can be used for finding a corresponding local data source. The interface configuration information may include an IP address or a memory identification of the local data source so that a memory address of the corresponding local data source may be located. The data sources may include databases, business profiles, data files, and the like. The local data source refers to a data source of the local system, but not a data source of the third-party cooperative system.
In one embodiment, the local data source may be stored in different subsystems of the local system, the server may determine a corresponding subsystem according to the interface configuration information, search the corresponding local data source in the determined subsystem, and then obtain the native data value corresponding to the key information in the searched local data source.
In one embodiment, the key information may be an order number, or a product number, or a customer identification, or the like. When the key information is an order number, S206 may specifically include: and determining a corresponding home terminal data source according to interface configuration information in the message rule set template, and traversing order information corresponding to the order number from the home terminal data source. As shown in fig. 3, the order information may include payment line information, household address, production certificate information, customer information, product information, unit address, and the like. The customer information may include a user name, a certificate number, a certificate type, a bank card number, a mobile phone number.
Correspondingly, the content of the message assembled after the order information is converted may also include: repayment line information, household registration address, production certificate information, customer information, product information, unit address and the like.
In one embodiment, when looking up a native data value, the look-up may be performed in conjunction with database fields, placeholders, pipes, fixed values, and attribute values. Specifically, the step of searching for the native data value corresponding to the key information from the local data source may specifically include: and determining a database field corresponding to the native data value to be searched according to the key information, and quickly positioning the native data value to be searched according to the field so as to obtain the native data value corresponding to the key information.
For example, as shown in fig. 4, the server determines, according to the key information, a field corresponding to the native data value to be searched in the database, and obtains, by the dataset loader, the native data value corresponding to the key information from the corresponding field in the database.
In an embodiment, after the local system is iteratively upgraded, when a subsystem of the local system changes, a corresponding data source may have a logical change, such as a change in an interface of the subsystem. At this time, the server may update the changed interface information with the interface configuration information in the message rule set template, and when a native data value is obtained from the data source, search for a corresponding native data source according to the updated interface configuration information.
For example, when the subsystem interface changes after the system is iteratively upgraded, the message rule set template is updated according to the changed subsystem interface information, so that the message rule set template records interface configuration information of the data source, that is, how to take values from different data sources and how to take values. And when the native data value is searched, the native data value is searched from the data source corresponding to the updated interface configuration information according to the message rule set template. Therefore, after the interface of the subsystem is changed and the logic change of the data source exists, the corresponding native data value can still be accurately acquired.
In one embodiment, when a problem or a requirement change is found in the development joint debugging process, the server reconfigures the interface of the system and updates the interface configuration information in the message rule set template according to the changed interface. And when the native data value is searched, searching the corresponding native data value from the data source according to the updated interface configuration information.
In one embodiment, when a data source is logically changed, a server acquires first interface information corresponding to the changed data source; updating interface configuration information in the message rule set template according to the first interface information; according to interface configuration information in the message rule set template, searching a native data value corresponding to the key information from a local data source comprises the following steps: selecting a local data source according to the updated interface configuration information in the message rule set template; and searching a native data value corresponding to the key information from the selected local data source.
And S208, converting the native data value according to the data conversion information in the message rule set template.
In one embodiment, the transformation of the native data source may include: the native data values are format converted, dictionary converted, or expression converted.
In one embodiment, S208 may specifically include: judging whether to convert the native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data value into a data value which meets the data format requirement of the third-party cooperative system.
For example, after obtaining the native data values, the server determines whether the native data values need to be converted according to the message rule set template. When it is determined that the conversion is needed, the server may convert the native data value into a form required by the third-party collaboration system, for example, when the date format required by the third-party collaboration system is YYYY/MM/DD, the original YYYY-MM-DD date format may be converted into the YYYY/MM/DD date format required by the third-party collaboration system.
And S210, according to the message assembly information in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed.
In one embodiment, the method further comprises: judging whether the assembled message meets the requirements of a test template or not by a message test tool; the test template is a template carried in a test tool and corresponding to the message rule set template; if so, determining that the message meets the message requirement of the third-party cooperative system; if not, determining that the message does not meet the message requirement of the third-party cooperative system.
For example, in the testing process, a message for testing is assembled, whether the testing message meets the requirements of a message rule set template is checked, and if the testing message meets the requirements, the testing message is correctly assembled; if not, the test message is incorrectly assembled. The correctness of message assembly is determined through the message rule set template, so that a manual comparison mode can be avoided, and the testing efficiency is improved.
In one embodiment, after the message is assembled, the server acquires address information of the device corresponding to the third-party cooperation system, and sends the assembled message to the device corresponding to the third-party cooperation system according to the address information, so that the third-party cooperation system performs corresponding operation after receiving the message. If the bank card information is assembled into a message and the message is sent to the equipment corresponding to the third-party cooperation system, the equipment corresponding to the third-party cooperation system carries out the verification operation of the bank card according to the bank card information.
In the above embodiment, the message rule set template includes interface configuration information of the local data source, data conversion information of the converted data value, and message assembly information of the assembled message, on one hand, when key information corresponding to the service to be processed is acquired, the native data value can be quickly acquired according to the message rule set template, the data value conversion is performed, and the converted native data value is assembled into a message corresponding to the service to be processed, so that the message can be quickly assembled; on the other hand, when the local data source is logically changed and the interface of the third-party cooperative system is changed, the message rule set template is updated accordingly, so that the message is assembled according to the updated message rule set template, the assembly of the sound effect message caused by the change of the interfaces of the local data source and the third-party cooperative system is avoided, and the assembly efficiency of the message is improved.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a message assembling apparatus, including: a key information acquisition module 502, a template selection module 504, a data value search module 506, a data value conversion module 508 and a message assembly module 510; wherein:
a key information obtaining module 502, configured to obtain input key information corresponding to a service to be processed;
a template selection module 504, configured to select a message rule set template corresponding to a third-party collaboration system; the message rule set template is updated along with the logic change of the data source and the change of the interface of the third-party cooperative system;
a data value searching module 506, configured to search, according to the interface configuration information configured in the message rule set template, a native data value corresponding to the key information from the local data source;
a data value conversion module 508, configured to convert the native data value according to the data conversion information configured in the message rule set template;
and a message assembling module 510, configured to assemble the converted native data values into a message corresponding to the service to be processed according to the message assembling information configured in the message rule set template.
In one embodiment, the data value conversion module 508 is further configured to determine whether to convert the native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data value into a data value which meets the data format requirement of the third-party cooperative system.
In one embodiment, as shown in fig. 6, the apparatus further comprises: an interface information acquisition module 512 and an interface configuration information update module 514; wherein:
the interface information obtaining module 512 is configured to, when the data source is logically changed, obtain first interface information corresponding to the changed data source;
an interface configuration information updating module 514, configured to update the interface configuration information in the message rule set template according to the first interface information;
the data value searching module 506 is further configured to select a local data source according to the updated interface configuration information in the message rule set template; and searching a native data value corresponding to the key information from the selected local data source.
In one embodiment, as shown in fig. 6, the apparatus further comprises: a decision block 516 and a determination block 518; wherein:
a judging module 516, configured to judge, by using a message testing tool, whether the assembled message meets the requirement of the testing template; the test template is a template carried in a test tool and corresponding to the message rule set template;
a determining module 518, configured to determine that the message meets the message requirement of the third-party collaboration system when the assembled message meets the requirement of the test template; and when the assembled message does not meet the requirement of the test template, determining that the message does not meet the message requirement of the third-party cooperation system.
In one embodiment, as shown in fig. 6, the apparatus further comprises: an interface information detection module 520, a message assembly information acquisition module 522 and a modification module 524; wherein:
an interface information detection module 520, configured to detect second interface information of the third-party cooperative system;
a message assembly information obtaining module 522, configured to obtain first message information corresponding to the third-party cooperative system when it is determined that the interface of the third-party cooperative system changes according to the second interface information;
and a modification module 524, configured to modify the message assembly information of the message rule set template according to the first message information.
In one embodiment, as shown in fig. 6, the apparatus further comprises: system access detection module 526 and template creation module 528: wherein:
a system access detection module 526, configured to detect whether a new third-party cooperative system accesses the local system;
the message assembly information obtaining module 522 is further configured to, when it is detected that a new third-party cooperative system accesses the home terminal system, obtain second message information corresponding to the new third-party cooperative system;
the template creating module 528 is configured to create a message rule set template corresponding to the new third-party collaboration system according to the second message information.
In the above embodiment, the message rule set template includes interface configuration information of the local data source, data conversion information of the converted data value, and message assembly information of the assembled message, on one hand, when key information corresponding to the service to be processed is acquired, the native data value can be quickly acquired according to the message rule set template, the data value conversion is performed, and the converted native data value is assembled into a message corresponding to the service to be processed, so that the message can be quickly assembled; on the other hand, when the local data source is logically changed and the interface of the third-party cooperative system is changed, the message rule set template is updated accordingly, so that the message is assembled according to the updated message rule set template, the assembly of the sound effect message caused by the change of the interfaces of the local data source and the third-party cooperative system is avoided, and the assembly efficiency of the message is improved.
For specific limitations of the message assembling apparatus, reference may be made to the above limitations on the message assembling method, which is not described herein again. All or part of each module in the message assembly device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database 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, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as native data values. 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 message assembly method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: acquiring input key information corresponding to a service to be processed; selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a local data source and the change of an interface of a third-party cooperation system; according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from a local data source; converting the native data value according to the data conversion information configured in the message rule set template; and according to the message assembly information configured in the message rule set template, assembling the converted native data values into a message corresponding to the service to be processed.
In one embodiment, the processor, when executing the computer program, further performs the steps of: judging whether to convert the native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data value into a data value which meets the data format requirement of the third-party cooperative system.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the data source is logically changed, acquiring first interface information corresponding to the changed data source; updating interface configuration information in the message rule set template according to the first interface information; searching a native data value corresponding to the key information from the local data source according to interface configuration information configured in the message rule set template comprises: selecting a local data source according to the updated interface configuration information in the message rule set template; and searching a native data value corresponding to the key information from the selected local data source.
In one embodiment, the processor, when executing the computer program, further performs the steps of: judging whether the assembled message meets the requirements of a test template or not by a message test tool; the test template is a template carried in a test tool and corresponding to the message rule set template; if so, determining that the message meets the message requirement of the third-party cooperative system; if not, determining that the message does not meet the message requirement of the third-party cooperative system.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting second interface information of a third-party cooperative system; when the interface of the third-party cooperation system is determined to be changed according to the second interface information, first message information corresponding to the third-party cooperation system is obtained; and modifying the message assembly information of the message rule set template according to the first message information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting whether a new third-party cooperative system is accessed to the local system; if so, acquiring second message information corresponding to the new third-party cooperative system; and creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring input key information corresponding to a service to be processed; selecting a message rule set template corresponding to a third-party cooperative system; the message rule set template is updated along with the logic change of a local data source and the change of an interface of a third-party cooperation system; according to interface configuration information configured in the message rule set template, searching a native data value corresponding to the key information from a local data source; converting the native data value according to the data conversion information configured in the message rule set template; and according to the message assembly information configured in the message rule set template, assembling the converted native data values into a message corresponding to the service to be processed.
In one embodiment, the processor, when executing the computer program, further performs the steps of: judging whether to convert the native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data value into a data value which meets the data format requirement of the third-party cooperative system.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the data source is logically changed, acquiring first interface information corresponding to the changed data source; updating interface configuration information in the message rule set template according to the first interface information; searching a native data value corresponding to the key information from the local data source according to interface configuration information configured in the message rule set template comprises: selecting a local data source according to the updated interface configuration information in the message rule set template; and searching a native data value corresponding to the key information from the selected local data source.
In one embodiment, the processor, when executing the computer program, further performs the steps of: judging whether the assembled message meets the requirements of a test template or not by a message test tool; the test template is a template carried in a test tool and corresponding to the message rule set template; if so, determining that the message meets the message requirement of the third-party cooperative system; if not, determining that the message does not meet the message requirement of the third-party cooperative system.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting second interface information of a third-party cooperative system; when the interface of the third-party cooperation system is determined to be changed according to the second interface information, first message information corresponding to the third-party cooperation system is obtained; and modifying the message assembly information of the message rule set template according to the first message information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting whether a new third-party cooperative system is accessed to the local system; if so, acquiring second message information corresponding to the new third-party cooperative system; and creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
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 Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
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-mentioned embodiments 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 (10)
1. A method of message assembly, the method comprising:
acquiring input key information corresponding to a service to be processed;
selecting a message rule set template corresponding to a third-party cooperative system;
when the data source is logically changed, acquiring first interface information corresponding to the changed data source; updating interface configuration information in the message rule set template according to the first interface information; selecting a local data source according to the updated interface configuration information in the message rule set template; searching a native data value corresponding to the key information from the selected local data source;
converting the native data value according to the data conversion information configured in the message rule set template;
and according to message assembly information configured in the message rule set template, assembling the converted native data values into messages corresponding to the service to be processed.
2. The method of claim 1, wherein the converting native data values according to the data conversion information configured in the message rule set template comprises:
judging whether to convert the native data value according to the message rule set template;
if so, determining the data format requirement of the third-party cooperative system according to the data conversion information;
and converting the native data values into data values meeting the data format requirements of the third-party cooperative system.
3. The method of claim 1, wherein the local data sources are stored in different subsystems of the local system; selecting the local data source according to the updated interface configuration information in the message rule set template comprises:
determining a corresponding subsystem according to the updated interface configuration information in the message rule set template;
and finding the corresponding local data source in the determined subsystem.
4. The method according to any one of claims 1 to 3, further comprising:
judging whether the assembled message meets the requirements of a test template or not by a message test tool; the test template is a template carried in the test tool and corresponding to the message rule set template;
if so, determining that the message meets the message requirement of the third-party cooperative system;
if not, determining that the message does not meet the message requirement of the third-party cooperative system.
5. The method according to any one of claims 1 to 3, further comprising:
detecting second interface information of the third-party cooperative system;
when the interface of the third-party cooperative system is determined to be changed according to the second interface information, the third-party cooperative system is started to operate
Acquiring first message information corresponding to the third-party cooperative system;
and modifying the message assembly information of the message rule set template according to the first message information.
6. The method according to any one of claims 1 to 3, further comprising:
detecting whether a new third-party cooperative system is accessed to the local system;
if so, acquiring second message information corresponding to the new third-party cooperative system;
and creating a message rule set template corresponding to the new third-party cooperative system according to the second message information.
7. A message assembly apparatus, the apparatus comprising:
the key information acquisition module is used for acquiring input key information corresponding to the service to be processed;
the template selection module is used for selecting a message rule set template corresponding to the third-party cooperation system; the message rule set template is updated along with the logic change of a data source and the change of an interface of the third-party cooperation system;
the interface information acquisition module is used for acquiring first interface information corresponding to the changed data source when the data source is logically changed;
the interface configuration information updating module is used for updating the interface configuration information in the message rule set template according to the first interface information;
the data value searching module is used for selecting a local data source according to the updated interface configuration information in the message rule set template; searching a native data value corresponding to the key information from the selected local data source;
the data value conversion module is used for converting the native data value according to the data conversion information configured in the message rule set template;
and the message assembly module is used for assembling the converted native data values into messages corresponding to the service to be processed according to the message assembly information configured in the message rule set template.
8. The apparatus of claim 7, wherein the data value conversion module is further configured to determine whether to convert a native data value according to the message rule set template; if so, determining the data format requirement of the third-party cooperative system according to the data conversion information; and converting the native data values into data values meeting the data format requirements of the third-party cooperative system.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. 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 one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811204617.XA CN109361628B (en) | 2018-10-16 | 2018-10-16 | Message assembling method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811204617.XA CN109361628B (en) | 2018-10-16 | 2018-10-16 | Message assembling method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109361628A CN109361628A (en) | 2019-02-19 |
CN109361628B true CN109361628B (en) | 2022-04-12 |
Family
ID=65349268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811204617.XA Active CN109361628B (en) | 2018-10-16 | 2018-10-16 | Message assembling method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109361628B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368512B (en) * | 2020-03-04 | 2023-08-22 | 北京软通智慧科技有限公司 | Service data conversion method, device, equipment and storage medium |
CN112052370A (en) * | 2020-09-02 | 2020-12-08 | 平安科技(深圳)有限公司 | Message generation method and device, electronic equipment and computer readable storage medium |
CN112003769A (en) * | 2020-09-11 | 2020-11-27 | 支付宝(杭州)信息技术有限公司 | Message processing method, device and equipment |
CN113504896B (en) * | 2021-07-12 | 2023-08-18 | 云南腾云信息产业有限公司 | Service data processing method and device of application program and mobile terminal |
CN114338835A (en) * | 2021-12-31 | 2022-04-12 | 中企云链(北京)金融信息服务有限公司 | Data message dynamic conversion method and device, storage medium and electronic device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1864392A (en) * | 2003-10-14 | 2006-11-15 | 国际商业机器公司 | Method and apparatus for translating data packets from one network protocol to another |
CN1987925A (en) * | 2006-12-29 | 2007-06-27 | 中国建设银行股份有限公司 | Complex front platform of financial system and transfering method transaction data |
CN101267448A (en) * | 2008-05-09 | 2008-09-17 | 东北大学 | An intelligent protocol conversion device and method based on embedded QNX operating system |
CN101957974A (en) * | 2009-07-15 | 2011-01-26 | 中国工商银行股份有限公司 | Multi-payment and clearing system supporting remittance processing device and method |
CN105357301A (en) * | 2015-11-11 | 2016-02-24 | 中国建设银行股份有限公司 | Message format conversion method and apparatus |
CN106027534A (en) * | 2016-05-26 | 2016-10-12 | 浪潮(苏州)金融技术服务有限公司 | System for implementing financial message processing based on Netty |
CN106657149A (en) * | 2017-01-24 | 2017-05-10 | 恒生电子股份有限公司 | Communication protocol conversion method and device |
-
2018
- 2018-10-16 CN CN201811204617.XA patent/CN109361628B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1864392A (en) * | 2003-10-14 | 2006-11-15 | 国际商业机器公司 | Method and apparatus for translating data packets from one network protocol to another |
CN1987925A (en) * | 2006-12-29 | 2007-06-27 | 中国建设银行股份有限公司 | Complex front platform of financial system and transfering method transaction data |
CN101267448A (en) * | 2008-05-09 | 2008-09-17 | 东北大学 | An intelligent protocol conversion device and method based on embedded QNX operating system |
CN101957974A (en) * | 2009-07-15 | 2011-01-26 | 中国工商银行股份有限公司 | Multi-payment and clearing system supporting remittance processing device and method |
CN105357301A (en) * | 2015-11-11 | 2016-02-24 | 中国建设银行股份有限公司 | Message format conversion method and apparatus |
CN106027534A (en) * | 2016-05-26 | 2016-10-12 | 浪潮(苏州)金融技术服务有限公司 | System for implementing financial message processing based on Netty |
CN106657149A (en) * | 2017-01-24 | 2017-05-10 | 恒生电子股份有限公司 | Communication protocol conversion method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109361628A (en) | 2019-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109361628B (en) | Message assembling method and device, computer equipment and storage medium | |
CN109474578B (en) | Message checking method, device, computer equipment and storage medium | |
CN110209652B (en) | Data table migration method, device, computer equipment and storage medium | |
CN108573371B (en) | Data approval method, device, computer equipment and storage medium | |
CN109446068B (en) | Interface test method, device, computer equipment and storage medium | |
WO2020186786A1 (en) | File processing method and apparatus, computer device and storage medium | |
CN109814854B (en) | Project framework generation method, device, computer equipment and storage medium | |
CN109992601B (en) | To-do information pushing method and device and computer equipment | |
CN110990400A (en) | Database query method and device, computer equipment and storage medium | |
CN111027295B (en) | Data processing method, device, computer equipment and storage medium | |
CN110109656B (en) | Interface simulation method, device, computer equipment and storage medium | |
CN110908778B (en) | Task deployment method, system and storage medium | |
CN108959384B (en) | Webpage data acquisition method and device, computer equipment and storage medium | |
CN109389299B (en) | Workflow process deployment method, workflow process deployment device, computer equipment and storage medium | |
WO2020199594A1 (en) | Service component loading method and apparatus, and computer device and storage medium | |
CN109460252B (en) | Configuration file processing method and device based on git and computer equipment | |
CN110716743B (en) | Aggregation API development method and system suitable for multiparty collaborative development | |
CN112380130A (en) | Application testing method and device based on call dependency relationship | |
CN112732742B (en) | Query page creating method and device, computer equipment and storage medium | |
CN114020840A (en) | Data processing method, device, server, storage medium and product | |
CN111047434B (en) | Operation record generation method and device, computer equipment and storage medium | |
CN111209061A (en) | Method and device for filling in user information, computer equipment and storage medium | |
CN114003432A (en) | Parameter checking method and device, computer equipment and storage medium | |
CN111522881B (en) | Service data processing method, device, server and storage medium | |
CN111722994A (en) | Task request response method and device |
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 |