CN112671873B - Data transmission method, data transmission device and readable storage medium - Google Patents

Data transmission method, data transmission device and readable storage medium Download PDF

Info

Publication number
CN112671873B
CN112671873B CN202011493842.7A CN202011493842A CN112671873B CN 112671873 B CN112671873 B CN 112671873B CN 202011493842 A CN202011493842 A CN 202011493842A CN 112671873 B CN112671873 B CN 112671873B
Authority
CN
China
Prior art keywords
data transmission
rule
target
data
list
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
CN202011493842.7A
Other languages
Chinese (zh)
Other versions
CN112671873A (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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network Technology 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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN202011493842.7A priority Critical patent/CN112671873B/en
Publication of CN112671873A publication Critical patent/CN112671873A/en
Application granted granted Critical
Publication of CN112671873B publication Critical patent/CN112671873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a data transmission method, a data transmission device and a readable storage medium. The data transmission method comprises the following steps: acquiring a target data transmission request; determining a target interface and a data transmission rule according to the target data transmission request and the set mapping set; and transmitting the target data according to the target interface and the data transmission rule. According to the invention, through the decoupling of the rule configuration of the set mapping set and the service process, the butt joint between the data transmission device and different platforms can be rapidly realized by a user only through setting the corresponding relation in the set mapping set, the butt joint of the different platforms is directly completed through the set mapping set, the set mapping set in the data transmission device comprises the target interfaces and the data transmission rules of a plurality of platforms, and the data transmission method can be multiplexed among the plurality of platforms.

Description

Data transmission method, data transmission device and readable storage medium
Technical Field
The invention belongs to the technical field of internet communication, and particularly relates to a data transmission method, a data transmission device and a readable storage medium.
Background
At present, platforms required to be docked by different clients have different requirements, the docking period between the platforms is long, and the docking between the platforms cannot be completed quickly.
Disclosure of Invention
The present invention is directed to solving one of the technical problems of the prior art or the related art.
To this end, a first aspect of the present invention proposes a data transmission method.
A second aspect of the present invention proposes a data transmission apparatus.
A third aspect of the invention proposes a readable storage medium.
In view of this, a data transmission method according to a first aspect of the present invention includes: acquiring a target data transmission request; determining a target interface and a data transmission rule according to the target data transmission request and the set mapping set; and transmitting the target data according to the target interface and the data transmission rule.
The invention provides a data transmission method which can realize data transmission among a plurality of different platforms and is particularly used for a data transmission device or a data transmission system. The data transmission device is connected with a plurality of different platforms and can directly transmit data among the platforms.
When the data transmission platform is determined to acquire the target data transmission request, extracting the set mapping set stored in the local storage area, and searching a corresponding target interface and a data transmission rule to be executed in the interface in the set mapping set according to the target data transmission request. And controlling the data transmission device to access to the target interface, and controlling the data transmission device to execute the data transmission rule so as to complete data transmission between the data transmission device and the plurality of platforms. The user can quickly realize the butt joint between the data transmission device and different platforms only by setting the corresponding relation in the set mapping set.
The configuration of the set mapping set rules is decoupled from the service process, so that different platforms can be directly butted through the set mapping set, and the set mapping set in the data transmission device comprises target interfaces and data transmission rules of a plurality of platforms, so that the data transmission device can be multiplexed among the plurality of platforms.
Specifically, the set mapping set includes a relationship configuration between the data transmission rule and the target interface, and the data transmission device completes the rule and can realize a call relationship with the interface. The request parameters of the target interfaces among the platforms realize the execution of data transmission requests of different platform interfaces through presetting the corresponding relation.
In a specific embodiment, the data transmission device is a merchant order taking platform, and the merchant order taking platform transmits order data with a plurality of different e-commerce platforms. The interface parameters of a plurality of different E-commerce platforms and the interface parameters between the merchant bill-grabbing platforms are set to be in one-to-one correspondence mapping relation, and conversion from the interface return parameters to order objects is achieved.
In addition, according to the data transmission method in the above technical solution provided by the present invention, the following additional technical features may also be provided:
in one possible design, the step of determining the target interface and the data transmission rule according to the target data transmission request and the setting mapping set specifically includes: extracting identification information in the target output transmission request; and searching a target interface and a target output data transmission rule in the set mapping set according to the identification information.
In the design, after a target data transmission request is acquired, the target data transmission request is analyzed, identification information in the target data transmission request is acquired, specifically, the identification information may be "identification code", a mapping relationship between the identification information and a data transmission rule corresponding to a platform interface and a platform is stored in a set mapping set, and a mapping relationship between the identification information and a data type is also stored.
The platform interface and the data transmission rule which need to be connected can be quickly found through the identification information in the target data transmission request obtained through analysis. When the interface information and the data transmission rule of the platform end are changed, only the setting mapping set stored in the data transmission device needs to be adjusted and modified. Other information in the data transmission device does not need to be updated, the data transmission device is quickly updated according to platform updating, and the workload of maintaining the data transmission device is reduced.
In a specific embodiment, the merchant bill-capturing platform sets a corresponding relation for each e-commerce platform, namely the transaction state, according to the service demand or other weight indexes by a worker to generate a set mapping set, and stores the set mapping set in a local storage area of the merchant bill-capturing platform.
The platform type settings are as follows:
TABLE 1
Figure BDA0002841485410000031
When the enumeration code and/or the sequence number are identified, the corresponding e-commerce platform can be directly inquired through the corresponding relation in the table 1, so that the interface of the corresponding store commodity platform is found.
The transaction types of the e-commerce platform are set as follows:
TABLE 2
Figure BDA0002841485410000032
And setting a one-to-one correspondence relationship between the identification information corresponding to the transaction state of the e-commerce platform and the identification information corresponding to the transaction state in the data transmission device. When the identification information of the order data state in the E-commerce platform is acquired, the order data state can be directly identified and converted into the transaction state identification in the data transmission device. Through the corresponding relation in the table 2, the identification information of each transaction state of the e-commerce platform can be directly inquired, so that the data transmission interface corresponding to the transaction state can be found.
In one possible design, the step of transmitting the target data according to the target interface and the data transmission rule specifically includes: accessing a target interface to obtain a data list; transmitting target data in the data list according to the data transmission rule; the data transmission rules comprise list rules, detail rules, conversion rules, storage rules and external rules.
In the design, after a target interface to be accessed when target transmission data is transmitted is determined, a data transmission device is controlled to access the target interface, and a data list in the corresponding target interface is obtained. And controlling the data transmission device to execute the transmission rule to process the data in the data list so as to complete the transmission of the target data.
In a specific embodiment, aiming at the transmission of order data docked among a plurality of different platforms, in combination with processing modes given by different platform interfaces, data transmission rules prefabricated by a system comprise detail rules, conversion rules, storage rules and external rules, and the next rule is involved in the output result depending on the previous rule. Aiming at the secondary development requirements of the client, the execution of the client development rules is completed by configuring the sequence of the client development rules in the four rules, so that the data transmission device is conveniently expanded.
In one possible design, transmitting target data in the data list according to a data transmission rule specifically includes: determining the paging state of the data list according to the list rule; determining a target execution sequence for executing the data transmission rule on the data list according to the paging state and the data transmission rule; and executing the data transmission rules according to the target execution sequence to transmit the target data.
In the design, before executing the detail rule, the conversion rule, the storage rule and the external rule, whether the data list needs paging needs to be judged, the target execution sequence of the list rule, the detail rule, the conversion rule, the storage rule and the external rule is determined according to the judgment result, and the data transmission rule is executed on the data list according to the target execution sequence, so that the target data transmission with the platform is realized.
In one possible design, the step of determining a target sequence of the data transmission rule for the data list according to the paging status and the set mapping set specifically includes: executing a list rule on the data list based on the data list being in a pageable state; and determining a first execution sequence of the detail rule, the conversion rule, the saving rule and the external rule according to the set mapping set, wherein the first execution sequence is taken as a target execution sequence.
In this design, it is determined by the list rule whether paging processing is required for the data list. When it is determined that the data list needs to be paged, paging processing in the list rules is performed on the data list, and the detail rule, the conversion rule, the save rule, and the external rule are performed in a first execution order after the paging processing. When it is determined that the paging processing for the data list is not required, the detailed rule, the conversion rule, the save rule, and the external rule are executed directly in the second execution order. And the fast processing of the list data is realized.
It can be understood that the first execution order and the second execution order are generally configured and completed for each platform, and the first execution order and the second execution order are correspondingly stored in the setting mapping set, so that when a target data transmission request is received, the first execution order and the second execution order of the target transmission rule corresponding to the platform can be determined, and the rule execution order corresponding to the platform does not need to be obtained each time data transmission is performed. And when the corresponding target data cannot be downloaded through the preset execution sequence, executing a step of updating the execution sequence, and updating the preset execution sequence.
In one possible design, the step of determining a target sequence of the data transmission rule for the data list according to the paging status and the set mapping set specifically includes: and determining a second execution sequence of the detail rule, the conversion rule, the saving rule and the external rule according to the set mapping set based on the condition that the data list is in the non-pageable state, and taking the second execution sequence as a target execution sequence.
In this design, it is determined by the list rule whether paging processing is required for the data list. And when the data list is determined to need paging processing, executing the paging processing in the list rules on the data list, and executing the detail rules, the conversion rules, the storage rules and the external rules according to a second execution sequence after the paging processing. When it is determined that the paging processing for the data list is not required, the detailed rule, the conversion rule, the save rule, and the external rule are executed directly in the second execution order. And the fast processing of the list data is realized.
It can be understood that the first execution order and the second execution order are generally configured and completed for each platform, and the first execution order and the second execution order are correspondingly stored in the setting mapping set, so that when a target data transmission request is received, the first execution order and the second execution order of the target transmission rule corresponding to the platform can be determined, and the rule execution order corresponding to the platform does not need to be obtained each time data transmission is performed.
The data transmission rules are as follows:
TABLE 3
Platform type Document type Movement of Rules are set Execution order Whether to page or not
C platform Order form Downloading List rules 100 Is that
C platform Order form Downloading Detailed rules 200 Whether or not
C platform Order form Downloading Transformation rules 300 Whether or not
C platform Order form Downloading Saving rules 400 Whether or not
C platform Order form Downloading External rules 500 Whether or not
And when the paging is required, the subsequent rule is continuously executed after paging, and when the paging is not required, the subsequent rule is directly executed.
In one possible design, the step of obtaining the target data transmission request further includes, before the step of obtaining the target data transmission request: timing and obtaining the interval duration of the previous target data transmission request; and determining that the interval time length is greater than or equal to the set time length.
In the design, after the target data transmission request is acquired, timing is started, and when the timing reaches a set duration, the acquisition of the target data transmission request is executed again. Timed execution of the target data transfer request is achieved. When a large amount of data transmission needs to be executed, the target data is directly transmitted in a timing mode without manually acquiring a target data transmission request by a user.
It is understood that, in the process of acquiring the target data transmission request at regular time, between two target data transmission requests, the user may choose to manually trigger the acquisition of the target data transmission request. Under the condition of low data transmission demand, the user can also close the function of regularly acquiring the target data transmission request.
In one possible design, the step of obtaining the target data transmission request further includes, before the step of obtaining the target data transmission request: acquiring a target interface and a data transmission rule; and correspondingly storing the target interface, the data transmission rule and the identification information to obtain a set mapping set.
In the design, a user can flexibly set the corresponding relation in the setting mapping set of the data transmission device, and can update the corresponding relation according to the updating content of other platforms.
In a specific embodiment, the mapping of the interface input parameters and the mapping of the interface output parameters are set, and the set corresponding relation is stored in a set mapping set in a local storage area.
Interface input parameters (input parameters) and interface output parameters (output parameters) of the corresponding platform can be quickly inquired by setting the mapping set. The data transmission device can be accessed to the data transmission interfaces in each platform according to the interface input parameters and the interface output parameters. The user can flexibly set the corresponding relation in the set mapping set of the data transmission device, and can update the corresponding relation according to the updating content of other platforms.
The entry configuration of the target interface is as follows:
TABLE 4
Interface Parameter name Type of parameter Mapping relationships Filtration conditions
api/morder/ordgetbatch OrderStatus Text Generic mapping status
api/morder/ordgetbatch OrderStatus Date Generic mapping startTime
api/morder/ordgetbatch OrderStatus Date of day Generic mapping endTime
api/morder/ordgetone OrderStatus Text Generic mapping tid
The entry configuration of the target interface is as follows:
TABLE 5
Interface Target object Object column Mapping relation
api/morder/ordgetbatch Original sheet Transaction number Generic mapping
api/morder/ordgetbatch Original sheet Transaction number Generic mapping
api/morder/ordgetone OrderCode Transaction number Generic mapping
According to a second aspect of the present invention, there is provided a data transmission apparatus, comprising: a memory having a program or instructions stored therein; a processor executing a program or instructions stored in a memory to implement a data transfer method as in any one of the possible designs of the first aspect described above. Therefore, the method has all the beneficial technical effects of any possible design of the data transmission method in the first aspect, and will not be described in detail herein.
According to a third aspect of the present invention, a readable storage medium is provided, on which a program or instructions are stored, which when executed by a processor, implement the steps of the data transmission method as in any one of the possible designs described above. Therefore, all the beneficial technical effects of the data transmission method in any one of the above possible designs are achieved, and no redundant description is given here.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 shows one of the flow diagrams of a data transmission method of the first embodiment of the present invention;
fig. 2 shows a second flowchart of the data transmission method according to the first embodiment of the invention;
fig. 3 shows a third flowchart of the data transmission method according to the first embodiment of the present invention;
fig. 4 shows a fourth flowchart of the data transmission method according to the first embodiment of the present invention;
FIG. 5 is a fifth flowchart illustrating a data transmission method according to a first embodiment of the present invention;
fig. 6 shows a sixth flowchart of the data transmission method according to the first embodiment of the present invention;
fig. 7 shows a seventh flowchart of the data transmission method of the first embodiment of the present invention;
fig. 8 shows one of the schematic block diagrams of a data transmission device of a second embodiment of the present invention;
fig. 9 shows a second schematic block diagram of a data transmission device according to a second embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
A data transmission method, a data transmission apparatus, and a readable storage medium according to some embodiments of the present invention are described below with reference to fig. 1 to 9.
Example one
As shown in fig. 1, a first embodiment of the present invention provides a data transmission method, including:
step 102, acquiring a target data transmission request;
step 104, determining a target interface and a data transmission rule according to the target data transmission request and the set mapping set;
and 106, transmitting the target data according to the target interface and the data transmission rule.
In this embodiment, a data transmission method can implement data transmission between a plurality of different platforms, and is particularly used for a data transmission device or a data transmission system. The data transmission device is connected with a plurality of different platforms and can directly transmit data between the platforms.
When the data transmission platform is determined to acquire the target data transmission request, extracting the set mapping set stored in the local storage area, and searching a corresponding target interface and a data transmission rule to be executed in the interface in the set mapping set according to the target data transmission request. And controlling the data transmission device to access to the target interface, and controlling the data transmission device to execute the data transmission rule so as to complete data transmission between the data transmission device and the plurality of platforms.
The configuration of the set mapping set rules is decoupled from the service process, so that different platforms can be directly butted through the set mapping set, and the set mapping set in the data transmission device comprises target interfaces and data transmission rules of a plurality of platforms, so that the data transmission device can be multiplexed among the plurality of platforms.
Specifically, the set mapping set includes a relationship configuration between the data transmission rule and the target interface, and the data transmission device completes the rule and can realize a call relationship with the interface. The request parameters of the target interfaces among the platforms realize the execution of data transmission requests of the interfaces of different platforms through the preset corresponding relation.
In a specific embodiment, the data transmission device is a merchant order taking platform, and the merchant order taking platform transmits order data with a plurality of different e-commerce platforms. The mapping relation between the interface parameters of a plurality of different E-commerce platforms and the interface parameters of the merchant order grabbing platform is set in a one-to-one correspondence mode, and conversion from interface return parameters to order objects is achieved.
In addition, according to the data transmission method in the above technical solution provided by the present invention, the following additional technical features may also be provided:
as shown in fig. 2, in any of the above embodiments, the step of determining the target interface and the data transmission rule according to the target data transmission request and the setting mapping set specifically includes:
step 202, extracting identification information in a target output transmission request;
and step 204, searching a target interface and a target output data transmission rule in the set mapping set according to the identification information.
In this embodiment, a data transmission method can implement data transmission between a plurality of different platforms, and is particularly used for a data transmission device or a data transmission system. The data transmission device is connected with a plurality of different platforms and can directly transmit data among the platforms.
After the target data transmission request is obtained, the target data transmission request is analyzed, and identification information in the target data transmission request is obtained, specifically, the identification information may be "identification code", a mapping relationship between the identification information and data transmission rules corresponding to the platform interface and the platform is stored in the set mapping set, and a mapping relationship between the identification information and the data type is also stored.
The platform interface and the data transmission rule which need to be connected can be quickly searched through the identification information in the target data transmission request obtained through analysis. When the interface information and the data transmission rule of the platform end are changed, only the setting mapping set stored in the data transmission device needs to be adjusted and modified. Other information in the data transmission device does not need to be updated, the data transmission device is quickly updated according to platform updating, and the workload of maintaining the data transmission device is reduced.
In a specific embodiment, the merchant bill-capturing platform sets a corresponding relation for each e-commerce platform, namely the transaction state, according to the service demand or other weight indexes by a worker to generate a set mapping set, and stores the set mapping set in a local storage area of the merchant bill-capturing platform.
The platform type settings are as follows:
TABLE 1
Figure BDA0002841485410000101
When the enumeration code and/or the sequence number are identified, the corresponding e-commerce platform can be directly inquired through the corresponding relation in the table 1, so that the interface of the corresponding store commodity platform is found.
When the data transmission platform is determined to acquire the target data transmission request, extracting the set mapping set stored in the local storage area, and searching a corresponding target interface and a data transmission rule to be executed in the interface in the set mapping set according to the target data transmission request. And controlling the data transmission device to access to the target interface, and then controlling the data transmission device to execute the data transmission rule so as to complete data transmission between the data transmission device and the plurality of platforms.
The configuration of the set mapping set rules is decoupled from the service process, so that different platforms can be directly butted through the set mapping set, and the set mapping set in the data transmission device comprises target interfaces and data transmission rules of a plurality of platforms, so that the data transmission device can be multiplexed among the plurality of platforms.
Specifically, the set mapping set includes a relationship configuration between the data transmission rule and the target interface, and the data transmission device completes the rule and can realize a call relationship with the interface. The request parameters of the target interface among the platforms realize the execution of the data transmission requests of the interfaces of different platforms through the preset corresponding relation
The transaction types of the e-commerce platform are set as follows:
TABLE 2
Figure BDA0002841485410000111
The identification information corresponding to the transaction state of the e-commerce platform and the identification information corresponding to the transaction state in the data transmission device are set to be in one-to-one correspondence. When the identification information of the order data state in the E-commerce platform is acquired, the order data state can be directly identified and converted into the transaction state identification in the data transmission device. Through the corresponding relation in the table 2, the identification information of each transaction state of the e-commerce platform can be directly inquired, so that the data transmission interface corresponding to the transaction state can be found.
As shown in fig. 3, in any of the above embodiments, the step of transmitting the target data according to the target interface and the data transmission rule specifically includes:
step 302, accessing a target interface to obtain a data list;
and step 304, transmitting the target data in the data list according to the data transmission rule.
The data transmission rules comprise list rules, detail rules, conversion rules, storage rules and external rules.
In this embodiment, after determining a target interface to be accessed when transmitting target transmission data, the data transmission device is controlled to access the target interface, and a data list in the corresponding target interface is obtained. And controlling the data transmission device to execute the transmission rule to process the data in the data list so as to complete the transmission of the target data.
In a specific embodiment, aiming at the transmission of order data docked among a plurality of different platforms, in combination with processing modes given by different platform interfaces, data transmission rules prefabricated by a system comprise detail rules, conversion rules, storage rules and external rules, and the next rule is involved in the output result depending on the previous rule. Aiming at the secondary development requirements of the client, the execution of the client development rules is completed by configuring the sequence of the client development rules in the four rules, so that the data transmission device is conveniently expanded.
As shown in fig. 4, in any of the above embodiments, the transmitting the target data in the data list according to the data transmission rule specifically includes:
step 402, determining the paging state of the data list according to the list rule;
step 404, determining a target execution sequence of executing the data transmission rule on the data list according to the paging state and the data transmission rule;
and 406, executing the data transmission rule according to the target execution sequence to transmit the target data.
In this embodiment, before executing the detail rule, the conversion rule, the storage rule, and the external rule, it is necessary to determine whether the data list needs to be paged, determine a target execution order of the list rule, the detail rule, the conversion rule, the storage rule, and the external rule according to the determination result, and execute the data transmission rule on the data list according to the target execution order, thereby achieving target data transmission with the platform.
As shown in fig. 5, in any of the above embodiments, the step of determining the target sequence of the data transmission rule performed on the data list according to the paging status and the set mapping set specifically includes:
step 502, executing a list rule on the data list based on the data list being in a pageable state;
and step 504, determining a first execution sequence of the detail rule, the conversion rule, the storage rule and the external rule according to the set mapping set, and taking the first execution sequence as a target execution sequence.
In this embodiment, whether paging processing is required for the data list is determined by the list rule. When the data list needs to be subjected to paging processing, the paging processing in the list rules is executed on the data list, and the detail rule, the conversion rule, the storage rule and the external rule are executed according to a first execution sequence after the paging processing. When it is determined that the paging processing for the data list is not required, the detailed rule, the conversion rule, the save rule, and the external rule are executed directly in the second execution order. And the fast processing of the list data is realized.
It can be understood that, the first execution order and the second execution order are generally configured and completed for each platform, and the first execution order and the second execution order are correspondingly stored in the setting mapping set, so that when a target data transmission request is received, the first execution order and the second execution order of the target transmission rule corresponding to the platform can be determined, and the rule execution order corresponding to the platform does not need to be obtained each time data transmission is performed. And when the corresponding target data cannot be downloaded through the preset execution sequence, executing a step of updating the execution sequence, and updating the preset execution sequence.
In any of the above embodiments, the step of determining a target sequence of the data transmission rule for the data list according to the paging status and the set mapping set specifically includes: and determining a second execution sequence of the detail rule, the conversion rule, the saving rule and the external rule according to the set mapping set based on the condition that the data list is in the non-pageable state, and taking the second execution sequence as a target execution sequence.
In this embodiment, the over-list rule determines whether paging is required for the data list. When the data list needs to be subjected to paging processing, the paging processing in the list rules is executed on the data list, and the detail rule, the conversion rule, the storage rule and the external rule are executed according to a first execution sequence after the paging processing. When it is determined that the data list does not need to be subjected to the paging processing, the detail rule, the conversion rule, the save rule, and the external rule are directly executed in the second execution order.
It can be understood that the first execution order and the second execution order are generally configured and completed for each platform, and the first execution order and the second execution order are correspondingly stored in the setting mapping set, so that when a target data transmission request is received, the first execution order and the second execution order of the target transmission rule corresponding to the platform can be determined, and the rule execution order corresponding to the platform does not need to be obtained each time data transmission is performed. And when the corresponding target data cannot be downloaded through the preset execution sequence, executing a step of updating the execution sequence, and updating the preset execution sequence.
The data transmission rules are as follows:
TABLE 3
Type of platform Document type Movement of Rules are set Execution order Whether to page or not
C platform Order form Downloading List rules 100 Is that
C platform Order form Downloading Detailed rules 200 Whether or not
C platform Order form Downloading Transformation rules 300 Whether or not
C platform Order form Downloading Saving rules 400 Whether or not
C platform Order form Downloading External rules 500 Whether or not
And when the list rules are executed, judging whether the data list needs to be paged, continuing to execute the subsequent rules after paging when the paging is needed, and directly executing the subsequent rules when the paging is not needed.
As shown in fig. 6, in any of the above embodiments, before the step of obtaining the target data transmission request, the method further includes:
step 602, timing and obtaining the interval duration of the previous target data transmission request;
step 604, determining that the interval duration is greater than or equal to the set duration.
In this embodiment, after the target data transmission request is acquired, timing is started, and when the timing reaches a set duration, the target data transmission request is executed again. Timed execution of the target data transfer request is achieved. When a large amount of data transmission needs to be executed, the target data is directly transmitted in a timing mode without manually acquiring a target data transmission request by a user.
It is understood that, in the process of acquiring the target data transmission request at regular time, between two target data transmission requests, the user may choose to manually trigger the acquisition of the target data transmission request. Under the condition of low data transmission demand, the user can also close the function of regularly acquiring the target data transmission request.
As shown in fig. 7, in any of the above embodiments, before the step of obtaining the target data transmission request, the method further includes:
step 702, acquiring a target interface and a data transmission rule;
step 704, correspondingly storing the target interface, the data transmission rule and the identification information to obtain a set mapping set.
In this embodiment, the user can flexibly set the corresponding relationship in the setting mapping set of the data transmission apparatus, and can also update it according to the update content of other platforms.
In a specific embodiment, the mapping of the interface input parameters and the mapping of the interface output parameters are set, and the set corresponding relation is stored in a set mapping set in a local storage area.
Interface input parameters (input parameters) and interface output parameters (output parameters) of the corresponding platform can be quickly inquired by setting the mapping set. The data transmission device can be accessed to the data transmission interfaces in each platform according to the interface input parameters and the interface output parameters.
The entry configuration of the target interface is as follows:
TABLE 4
Interface Parameter name Type of parameter Mapping relationships Filtration conditions
api/morder/ordgetbatch OrderStatus Text Generic mapping status
api/morder/ordgetbatch OrderStatus Date Generic mapping startTime
api/morder/ordgetbatch OrderStatus Date Generic mapping endTime
api/morder/ordgetone OrderStatus Text Generic mapping tid
The entry configuration of the target interface is as follows:
TABLE 5
Interface Target object Object column Mapping relationships
api/morder/ordgetbatch Original bill Transaction number Generic mapping
api/morder/ordgetbatch Original sheet Transaction number Generic mapping
api/morder/ordgetone OrderCode Transaction number Generic mapping
Example two
As shown in fig. 8, according to a second aspect of the present invention, there is provided a data transmission apparatus 800, including: a memory 802, the memory 802 having programs or instructions stored therein; a processor 804, the processor 804 executing a program or instructions stored in the memory 802 to implement the data transmission method as in any of the possible embodiments of the first aspect described above. Therefore, all the beneficial technical effects of the data transmission method in any possible embodiment of the first aspect are achieved, and no redundant description is provided herein.
In one embodiment, as shown in fig. 9, the data transmission apparatus 800 includes a state presetting unit 902, a rule configuration unit 904, an interface configuration unit 906, and an execution rule unit 908.
The state presetting unit 902 is used for presetting the type of the platform and the transaction state contrast presetting relationship according to the service requirement by a programmer. The rule configuration unit 904 downloads the order form docked by the platform, and combines the processing mode given by the platform interface, the rules prefabricated by the system include list, detail, conversion and storage, and are executed in sequence, and the next rule is entered into the output result depending on the previous rule. Aiming at the second-opening requirement of the client, the execution of the customer-opening rule is completed by configuring the sequence of the customer-opening rule in the four rules, and the expansion is convenient. The interface configuration unit 906 configures request interface information, request parameters of an interface, and return parameters of the interface according to a configuration relationship between a rule and the interface, and acquires data of a platform interface.
The data transmission device 900 specifically includes an execution rule unit 908 for acquiring rules configured under the current platform, document, and action. And judging whether the page is contained or not, and judging whether the page is contained or not according to the preset ipage configured by the rule. Including the paging rule, the paging rule is executed by obtaining the paging rule and the previous rule. And if the paging rule is not contained, sequentially executing the configuration rule list.
Through the relation configuration of rules, interfaces and request access parameters, the requests of different interfaces are quickly realized, codes are unified and standardized, and request codes of different interfaces can be reused. The business rule configuration is decoupled from the process code development, different platforms generate a dynamic configurable operating environment according to business requirements, and the business rules can be reused. The output parameters of the interface are mapped and configured through the configurable parameters and the target object, the dynamic analysis of the output parameters is completed, and the codes can be reused. The platform interface changes, and the service upgrade can be completed by modifying the configuration.
EXAMPLE III
An embodiment of the present invention provides a readable storage medium, on which a program is stored, and the program, when executed by a processor, implements the data transmission method in any of the above embodiments, thereby having all the advantageous technical effects of the data transmission method in any of the above embodiments.
The readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed at the same time.
In the present invention, the term "plurality" means two or more unless explicitly defined otherwise. The terms "mounted," "connected," "fixed," and the like are to be construed broadly, and for example, "connected" may be a fixed connection, a removable connection, or an integral connection; "coupled" may be direct or indirect through an intermediary. The specific meanings of the above terms in the present invention can be understood according to specific situations by those of ordinary skill in the art.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The present invention has been described in terms of the preferred embodiment, and it is not intended to be limited to the embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method of data transmission, comprising:
acquiring a target data transmission request;
determining a target interface and a data transmission rule according to the target data transmission request and a set mapping set;
transmitting the target data according to the target interface and the data transmission rule;
the step of determining a target interface and a data transmission rule according to the target data transmission request and the set mapping set specifically includes:
extracting identification information in the target data transmission request;
searching the target interface and the data transmission rule in a set mapping set according to the identification information;
the step of transmitting the target data according to the target interface and the data transmission rule specifically includes:
accessing the target interface to obtain a data list;
transmitting the target data in the data list according to the data transmission rule;
the data transmission rules comprise a list rule, a detail rule, a conversion rule, a storage rule and an external rule;
the transmitting the target data in the data list according to the data transmission rule specifically includes:
determining the paging state of the data list according to the list rule;
determining a target execution sequence for executing the data transmission rule on the data list according to the paging state and the data transmission rule;
and executing the data transmission rules according to the target execution sequence to transmit the target data.
2. The data transmission method according to claim 1, wherein the step of determining a target sequence for executing the data transmission rule on the data list according to the paging status and the set mapping set specifically includes:
executing a list rule on the data list based on the data list being in a pageable state;
and determining a first execution sequence of the detail rule, the conversion rule, the saving rule and the external rule according to the setting mapping set, wherein the first execution sequence is used as the target execution sequence.
3. The data transmission method according to claim 1, wherein the step of determining a target sequence for executing the data transmission rule on the data list according to the paging status and the set mapping set specifically includes:
and determining a second execution sequence of the detail rule, the conversion rule, the saving rule and the external rule according to the set mapping set based on the condition that the data list is in a non-pageable state, wherein the second execution sequence is taken as the target execution sequence.
4. The data transmission method according to any one of claims 1 to 3, wherein the step of obtaining the target data transmission request is preceded by:
timing and obtaining the interval duration of the previous target data transmission request;
and determining that the interval time length is greater than or equal to a set time length.
5. The data transmission method according to any one of claims 1 to 3, wherein the step of obtaining the target data transmission request is preceded by:
acquiring the target interface and the data transmission rule;
and correspondingly storing the target interface, the data transmission rule and the identification information to obtain the set mapping set.
6. A data transmission apparatus, comprising:
a memory having a program or instructions stored therein;
a processor executing a program or instructions stored in the memory to implement the data transmission method of any one of claims 1 to 5.
7. A readable storage medium on which a program or instructions are stored, the program or instructions, when executed by a processor, implementing the data transmission method according to any one of claims 1 to 5.
CN202011493842.7A 2020-12-17 2020-12-17 Data transmission method, data transmission device and readable storage medium Active CN112671873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011493842.7A CN112671873B (en) 2020-12-17 2020-12-17 Data transmission method, data transmission device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011493842.7A CN112671873B (en) 2020-12-17 2020-12-17 Data transmission method, data transmission device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112671873A CN112671873A (en) 2021-04-16
CN112671873B true CN112671873B (en) 2022-11-15

Family

ID=75404512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011493842.7A Active CN112671873B (en) 2020-12-17 2020-12-17 Data transmission method, data transmission device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112671873B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367597B2 (en) * 2013-11-18 2016-06-14 International Business Machines Corporation Automatically managing mapping and transform rules when synchronizing systems
CN108563768B (en) * 2018-04-19 2023-05-23 中国平安财产保险股份有限公司 Data conversion method, device, equipment and storage medium for different data models
CN109769023B (en) * 2019-01-16 2021-11-19 网宿科技股份有限公司 Data transmission method, related server and storage medium
CN110995842A (en) * 2019-12-06 2020-04-10 北京每日优鲜电子商务有限公司 Method, device and equipment for downloading service data and storage medium
CN111950562A (en) * 2020-09-02 2020-11-17 深圳市泽汇科技有限公司 Picture processing method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN112671873A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
FI90475C (en) Real-time distributed database processing system
US6434580B1 (en) System, method, and recording medium for drafting and preparing patent specifications
CN100557567C (en) A kind of method, system and device of prompting software version update
EP1073952B1 (en) Multi-tiered incremental software updating
US20050235019A1 (en) Method and system for transmitting data for data synchronization between server and client when data synchronization session was abnormally terminated
CN104954468A (en) Resource allocation method and resource allocation device
CN109933585B (en) Data query method and data query system
CN111338770A (en) Task scheduling method, server and computer readable storage medium
CN103368986A (en) Information recommendation method and information recommendation device
CN109241095B (en) Rapid query method, terminal and storage medium
CN109670157B (en) Control method for table height and related equipment
US20020083071A1 (en) Apparatus and method for data transfer between databases
CN103095758A (en) Distributed file system and file data processing method thereof
CN110399389A (en) Data page querying method, device, equipment and storage medium
CN112671873B (en) Data transmission method, data transmission device and readable storage medium
CN101169655A (en) Process control system
CN106161519A (en) A kind of information getting method and device
CN101288073B (en) Systems, methods, and software for retrieving information using multiple query languages
CN111242595B (en) Method and device for exchanging information between ERP platform and payment platform
JP2010128831A (en) Data retrieval system, method and computer program
CN110555178A (en) Data proxy method and device
US10341432B2 (en) System for optimizing web page loading
CN112688980B (en) Resource distribution method and device, and computer equipment
JPH08235112A (en) Decentralized job management system of computer system
CN107493316B (en) Application operation management method, server and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant