CN115866043A - Service sending method and system, service receiving method and system, equipment and medium - Google Patents
Service sending method and system, service receiving method and system, equipment and medium Download PDFInfo
- Publication number
- CN115866043A CN115866043A CN202211559528.3A CN202211559528A CN115866043A CN 115866043 A CN115866043 A CN 115866043A CN 202211559528 A CN202211559528 A CN 202211559528A CN 115866043 A CN115866043 A CN 115866043A
- Authority
- CN
- China
- Prior art keywords
- service
- file
- message
- sending
- receiving
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 85
- 230000005540 biological transmission Effects 0.000 claims abstract description 103
- 238000012795 verification Methods 0.000 claims description 12
- 238000012790 confirmation Methods 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 210000001503 joint Anatomy 0.000 abstract description 6
- 230000008569 process Effects 0.000 description 13
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 230000002159 abnormal effect Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000000903 blocking effect Effects 0.000 description 3
- 239000000835 fiber Substances 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000007717 exclusion Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003319 supportive effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a service sending method and system, a service receiving method and system, electronic equipment and a storage medium, the service sending method comprises the following steps: the service sending terminal uploads the service file to the object storage service; the object storage service stores the service file and returns the file ID of the service file to the service sending end; the service sending end generates a service sending message according to the file ID and sends the service sending message to a message middleware; and the EDI server responds to the service transmission message in the message middleware and executes the transmission of the service file. The service sending method and system, the service receiving method and system, the electronic device and the storage medium provided by the invention can reduce the load pressure of the EDI server, can decouple the transmission butt joint of the service end and the EDI server, and can deal with the pressure of a large number of service files during transmission.
Description
Technical Field
The present invention relates to the field of computer communication technologies, and in particular, to a service sending method and system, a service receiving method and system, an electronic device, and a storage medium.
Background
In the prior art, in service transmission based on an EDI server, a service sending end generally uploads a service File to the EDI server directly through a File Stream (File Stream), and the EDI server stores the service File to a local sending directory and sends the service File to a service receiving end through timing scanning.
However, file data is transmitted through a file stream, which occupies a thread pool of the EDI server, and causes that other common interfaces cannot respond in time. And the sending interface of the service end can rely on the calling return after the EDI server sends the file, and the interface is easy to report errors or fuse due to overtime.
Therefore, in order to solve the above technical problems, it is necessary to provide a new service transmission method and system, a new service reception method and system, an electronic device, and a storage medium.
Disclosure of Invention
The invention aims to provide a service sending method and system, a service receiving method and system, electronic equipment and a storage medium, which can reduce the load pressure of an EDI server, can decouple the transmission butt joint of a service end and the EDI server, and can deal with the pressure of transmission of a large number of service files.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
in a first aspect, the present invention provides a service sending method, which includes:
the service sending terminal uploads the service file to the object storage service;
the object storage service stores the service file and returns the file ID of the service file to the service sending end;
the service sending end generates a service sending message according to the file ID and sends the service sending message to a message middleware;
and the EDI server responds to the service transmission message in the message middleware to execute the transmission of the service file.
In one or more embodiments of the invention, the method further comprises: and the service sending end stores a sending record of the service file, wherein the sending record comprises the file ID and the sending state of the service file.
In one or more embodiments of the invention, the method further comprises: and the message middleware responds to the received service sending message and returns a sending confirmation receipt to the service sending end.
In one or more embodiments of the present invention, the EDI server, in response to the service transmission message in the message middleware, performs transmission of the service file, including:
responding to the service sending message in the message middleware by the EDI server, and analyzing the service sending message to check whether the configuration information is correct or not; and after the verification is passed, the EDI server downloads the service file from the object storage service and sends the service file to a service receiving end.
In one or more embodiments of the invention, the method further comprises: determining whether the service file is successfully transmitted; when the service file is successfully transmitted, returning a transmission result to the EDI server; the EDI server updates a service transmission record according to the sending result and sends the sending result to the message middleware; and the service sending end responds to the sending result in the message middleware and updates the sending record of the service file.
In one or more embodiments of the invention, the method further comprises: when the service file fails to be sent, the EDI server sends a service retransmission message to the message middleware; and the EDI server responds to the service retransmission message in the message middleware and re-executes the transmission of the service file.
In a second aspect, the present invention provides a service receiving method, which includes:
the EDI server receives the business file and uploads the business file to an object storage service;
the object storage service saves the business file and returns the file ID of the business file to the EDI server;
the EDI server generates a service receiving message according to the file ID and sends the service receiving message to a message middleware;
and the service receiving end responds to the service receiving message in the message middleware to execute the receiving of the service file.
In one or more embodiments of the invention, the method further comprises: and the EDI server stores a receiving record of the service file, wherein the receiving record comprises the file ID and the receiving state of the service file.
In one or more embodiments of the invention, the method further comprises: and the message middleware responds to the received service receiving message and returns a sending confirmation receipt to the service sending end.
In one or more embodiments of the present invention, the service receiving end, in response to the service reception message in the message middleware, performs reception of the service file, including:
the service receiving end responds to the service receiving message in the message middleware and analyzes the service receiving message to check whether the configuration information is correct or not; and after the verification is passed, the business receiving end downloads and stores the business file from the object storage service.
In a third aspect, the present invention provides a service transmission system, which includes: the system comprises a service sending end, an object storage service, message middleware and an EDI server;
the object storage service is used for storing the service file uploaded by the service sending end and returning the file ID of the service file to the service sending end;
the service sending end is used for generating a service sending message according to the file ID and sending the service sending message to the message middleware;
the EDI server is used for responding to the service transmission message in the message middleware to execute the transmission of the service file.
In a fourth aspect, the present invention provides a service receiving system, which includes: the system comprises a business receiving end, an object storage service, message middleware and an EDI server;
the object storage service is used for storing the service file uploaded by the EDI server and returning the file ID of the service file to the EDI server;
the EDI server is used for generating a service receiving message according to the file ID and sending the service receiving message to the message middleware;
the service receiving end is used for responding to the service receiving message in the message middleware to execute the receiving of the service file.
In a fifth aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the service transmission method or the service reception method as described above when executing the program.
In a sixth aspect, the present invention provides a computer-readable medium carrying computer-executable instructions, which when executed by a processor, are configured to implement the service transmission method or the service reception method as described above.
Compared with the prior art, the service sending method provided by the invention has the advantages that the service file to be sent is uploaded to the object storage service to generate the file ID corresponding to the service file, the file ID replaces the service file to transmit to the EDI server, the uploading load of the service file can be isolated, the EDI server cannot cause call blockage due to the uploading of the service file, and the storage pressure of the EDI server can be reduced. Moreover, the service sending message is sent and monitored through the message middleware, the transmission butt joint of the service sending end and the EDI server can be decoupled, the sending of the service file is asynchronously executed, the method and the device can be suitable for abnormal conditions such as network abnormality and instability, and the sending stability of the service file is improved.
According to the service receiving method provided by the invention, the service file to be received is uploaded to the object storage service to generate the file ID corresponding to the service file, and the file ID replaces the service file to transmit to the service receiving end, so that the downloading load of the service file can be isolated, and the EDI server can not cause call blocking due to the downloading of the service file. Moreover, the service receiving information is sent and monitored through the message middleware, the service system is informed of confirming the file receiving through the message queue, the timeliness is good, the transmission butt joint of the service receiving end and the EDI server can be decoupled, the service file receiving is asynchronously executed, the method and the device can be suitable for abnormal conditions such as network abnormality and instability, and the stability of service file receiving is improved.
Drawings
Fig. 1 is a flowchart of a service transmission method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a service transmission system according to an embodiment of the present invention;
fig. 3 is a flowchart of a service receiving method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a service receiving system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
In order to facilitate understanding of the technical aspects of the present application, technical terms that may appear in the present invention are first explained in detail below.
Object Storage Service (OSS): is a cloud storage service that can store and retrieve unstructured data and metadata objects, e.g., the arri cloud, the hua-shi cloud, the tengcong cloud, etc. The object storage service theoretically has no limit on total data capacity and the number of objects/files, can provide a super-large storage capacity for users, is suitable for storing any type of files, and is suitable for common users, websites, enterprises and developers. The object storage service is a service facing Internet access, a Web service interface based on an HTTP/HTTPS protocol is provided, a user can be connected to a computer on the Internet at any time and any place, and data stored in the object storage service is accessed and managed through an object storage service management console or various object storage service tools. In addition, the object storage service supports SDK and OSS API interfaces, so that a user can conveniently manage data stored on the object storage service and develop various types of upper-layer service applications.
EDI (Electronic data exchange): the method is characterized in that standard economic information is transmitted between electronic computer systems of trading partners through a communication network according to a set of universal standard formats which are uniformly specified to carry out data exchange and automatic processing. EDI is also colloquially referred to as "paperless transactions" because its use effectively reduces the paper documents until the final elimination of the trade process.
Message Middleware (MQ): is a supportive software system that provides synchronous or asynchronous, reliable message transmission for application systems in a network environment based on queue and message passing technology. Message middleware is suitable for distributed environments where reliable data transfer is required. In the system adopting the message middleware mechanism, different objects activate the event of the other side by transmitting messages, and the corresponding operation is completed. The sender sends the message to the message server, and the message server stores the message in a plurality of queues and forwards the message to the receiver when appropriate. Message middleware, which is often used to mask features between various platforms and protocols, enables collaboration between applications, provides synchronous and asynchronous connections between clients and servers, and can deliver or store-and-forward messages at any time.
The service sending method and the service receiving method provided by the embodiment of the invention can be used for transmitting the service file between the service system and the EDI server. In an exemplary application scenario, the enterprise a may implement sending the service file in the service system a to the EDI server based on the service sending method provided by the present invention. Based on the service receiving method provided by the invention, the enterprise B can realize that the service system B receives the service file from the EDI server.
Referring to fig. 1, a service sending method according to an embodiment of the present invention may be executed by any computing device, and includes the following steps:
s101: and the service sending end uploads the service file to the object storage service.
It should be noted that, a service system that can be used for sending a service file is deployed on the service sending end. The service sending terminal may be various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, a portable computer, a desktop computer, and the like. The user can realize various interactions with the service system based on the service sending end, for example, realize service information configuration, service file generation, service file sending, service file uploading and the like.
After the user completes the configuration of the service information through the service system based on the service sending end, a corresponding service file (file to be sent) can be generated, and the service file can be uploaded to the object storage service.
S102: and the object storage service stores the service file and returns the file ID of the service file to the service sending end.
After receiving and storing the service file uploaded by the service sending end, the object storage service can generate a file ID of the service file, that is, a globally Unique Identifier (UID) of the service file. The file ID can be used for searching the corresponding service file, and the server and the user can find the corresponding service file through the file ID without knowing the physical address of the service file.
In an exemplary embodiment, in an object storage service, the real file system may have a globally unique ID for each object as shown in the following table.
Business document 1 | ID 1 |
Business document 2 | ID 2 |
Service file 3 | ID 3 |
S103: and the service sending end generates a service sending message according to the file ID and sends the service sending message to a message middleware.
After receiving the file ID returned by the object storage service, the service sending end can assemble and generate a service sending message containing the file ID according to the file ID and send the service sending message to a service sending queue of the message middleware. Since there is a one-to-one correspondence between the file ID and the service file, the service file is stored in the service transmission message in the form of a file ID.
In an exemplary embodiment, in a process that a service sending end sends a service sending message to a service sending queue of a message middleware, the service sending end stores a sending record of a service file (file to be sent). Wherein the transmission record includes a file ID, a transmission status, a transmission record ID, a transmission port ID, and the like of the service file. Preferably, the service sending end may persistently store the sending record to ensure that the sending record is not lost, so as to facilitate subsequent updating and viewing of the sending record.
For example, in the process that the service sending end sends the service sending message of the service file 1 to the service sending queue of the message middleware, the service sending end stores the sending record of the service file 1. The format of the transmission record may be as follows:
file ID | Sending status | Sending a record ID | Sending port ID |
ID 1 | In transmission | 1 | 1 |
In an exemplary embodiment, the message middleware can return a transmission acknowledgement to the service sender in response to the received service transmission message. The sending confirmation receipt can be used for helping the service sending end to confirm that the service sending message sent to the message middleware by the service sending end is successfully received by the message middleware.
Specifically, after receiving a service transmission message sent by a service transmission end, a service transmission queue of the message middleware can persist the service transmission message until the service transmission message is completely processed (consumed). It should be noted that before a message is deleted from the message middleware, the processing system is required to explicitly indicate that the message has been processed, so as to ensure that the message is safely stored until the message is used up, thereby avoiding the risk of data loss.
S104: and the EDI server responds to the service transmission message in the message middleware to execute the transmission of the service file.
Specifically, the EDI server can monitor the message in the message middleware, and after the EDI server monitors the service transmission message in the message middleware, the EDI server can execute transmission of the service file according to the service transmission message.
In an exemplary embodiment, the EDI server responds to the service sending message in the message middleware, and analyzes the service sending message to check whether the configuration information is correct; and after the verification is passed, the EDI server downloads the service file from the object storage service and sends the service file to a service receiving end.
Specifically, after the service receiving message is analyzed, the file ID included in the service sending message can be obtained, and the corresponding service file can be found from the object storage service according to the file ID, so that the downloading of the service file in the object storage service can be realized.
It should be noted that the verification configuration information specifically includes: checking port information, such as whether a port exists or not, whether an encryption certificate is in a valid period or not, and the like; and checking file information, such as whether a service file exists or not, whether the size of the service file exceeds the maximum limit or not, and the like.
In an exemplary embodiment, in the process that the EDI server transmits the service file to the service receiving end, the transmission result of the service file may be polled to determine whether the service file is successfully transmitted. The specific polling rule may be set according to actual needs, and for example, the transmission result may be queried every 10 seconds, or may be queried every 1 minute.
Specifically, when the service file is successfully transmitted, the service receiving end returns a transmission result to the EDI server; the EDI server updates a service transmission record according to the sending result and sends the sending result to a service sending result queue of the message middleware; and the service sending end responds to the sending result in the service sending result queue of the message middleware and updates the sending record of the service file.
It should be noted that the service transmission record includes the file ID and the transmission status of the service file. And when the service file is successfully transmitted, the EDI server updates the transmission state of the service file in the transmission record to 'transmission completion' according to the corresponding transmission result. When the service file is successfully sent, the service sending end can respond to the sending result in the message middleware, and update the sending state of the service file which is recorded by sending to be 'sending completion', so that the sending process of the whole service file is finished.
Specifically, when the service file fails to be sent, the EDI server sends a service retransmission message to a service retransmission queue of the message middleware; and the EDI server responds to the service retransmission message in the service retransmission queue of the message middleware and re-executes the transmission of the service file.
It should be noted that, after monitoring the service transmission message, the EDI server performs persistent storage of the transmission record. If an abnormal condition occurs in the process that the EDI server executes the sending of the service file, which results in the failure of sending the service file (i.e. the service file is not successfully transmitted to the service receiving end), the EDI server will send a service retransmission message to a service retransmission queue of the message middleware, and the EDI server can re-execute the sending of the service file according to the service retransmission message to ensure the reliable sending of the service file.
The specific process of re-executing the service file according to the service retransmission message in the service retransmission queue is similar to the process of executing the service file according to the service transmission message in the service transmission queue, and is not described herein again.
In an exemplary embodiment, when the service file fails to be sent, the EDI server can send an exception notification message to the service sending end, so that the user can handle an exception condition according to the exception notification message. The abnormity reminding information comprises recoverable abnormity, unrecoverable abnormity and unknown abnormity; recoverable exceptions include certificate matching exceptions, port matching exceptions, address access exceptions, network timeout exceptions, and the like; unrecoverable exceptions include mdn resolution exceptions, etc.; unknown exceptions include null pointer exceptions, other network exceptions, and the like.
In summary, the service sending method provided by the present invention uploads the service file to be sent to the object storage service to generate the file ID corresponding to the service file, and transmits the file ID to the EDI server instead of the service file itself, so that the upload load of the service file can be isolated, the EDI server does not cause call blocking due to the upload of the service file, and the storage pressure of the EDI server can be reduced. Moreover, the service sending message is sent and monitored through the message middleware, the transmission butt joint of the service sending end and the EDI server can be decoupled, the sending of the service file is asynchronously executed, the method and the device can be suitable for abnormal conditions such as network abnormality and instability, and the sending stability of the service file is improved.
Referring to fig. 2, based on the same inventive concept as the aforementioned service transmission method, an embodiment of the present invention provides a service transmission system 200, which includes: a service sender 201, an object storage service 202, message middleware 203, and an EDI server 204.
The object storage service 202 is configured to store the service file uploaded by the service sending end 201, and return a file ID of the service file to the service sending end 201. The service sending end 201 is configured to generate a service sending message according to the file ID, and send the service sending message to the message middleware 203. The EDI server 204 is configured to respond to the service transmission message in the message middleware 203 to perform transmission of the service file.
The service sender 201, the object storage service 202, the message middleware 203 and the EDI server 204 are connected in communication through a network 205. Network 205 is a medium used to provide communication links between service sender 201, object storage service 202, message middleware 203, and EDI server 204. Network 205 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The service sender 201 may be various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, a portable computer, a desktop computer, and the like. Object storage service 202 may be the Aliskiun cloud, huazhiyun, tencent cloud, and so on. The message middleware 203 may be RabbitMQ, activeMQ, kafka, and the like. The EDI server 204 may be various servers in which an EDI system is deployed, for example, an independent physical server, a server cluster or a distributed system configured by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
In an exemplary embodiment, in the process that the service sender 201 sends the service sending message to the service sending queue of the message middleware 203, the service sender 201 stores a sending record of the service file. Wherein the transmission record includes a file ID, a transmission status, a transmission record ID, a transmission port ID, and the like of the service file. Preferably, the service sender 201 may persistently store the aforementioned sending record to ensure that the sending record is not lost, so as to facilitate subsequent updating and viewing of the sending record.
In an exemplary embodiment, the message middleware 203 can return a transmission acknowledgement to the service sender 201 in response to receiving the service transmission message. The transmission confirmation receipt can be used to help the service sender 201 confirm that the service transmission message sent to the message middleware 203 has been successfully received by the message middleware 203.
In an exemplary embodiment, the EDI server 204 can respond to the service transmission message in the message middleware 203, and parse the service transmission message to check whether the configuration information is correct; after the verification is passed, the EDI server 204 may download the service file from the object storage service 202, and send the downloaded service file to a service receiving end.
It should be noted that the verification configuration information specifically includes: checking port information, such as whether a port exists or not, whether an encryption certificate is in a valid period or not, and the like; and checking file information, such as whether a service file exists or not, whether the size of the service file exceeds the maximum limit or not, and the like.
In an exemplary embodiment, in the process of transmitting the service file to the service receiving end by the EDI server 204, the transmission result of the service file may be polled to determine whether the service file is successfully transmitted.
Specifically, when the service file is successfully transmitted, the service receiving end can return a transmission result to the EDI server 204; the EDI server 204 can update the service transmission record according to the sending result, and send the sending result to the service sending result queue of the message middleware 203; the service sender 201 can update the sending record of the service file in response to the sending result in the service sending result queue of the message middleware 203.
Specifically, when the transmission of the service file fails, the EDI server 204 can transmit a service retransmission message to a service retransmission queue of the message middleware 203; the EDI server 204 can re-execute the transmission of the service file in response to the service retransmission message in the service retransmission queue of the message middleware.
Referring to fig. 3, a service receiving method according to an embodiment of the present invention can be executed by any computing device, and includes the following steps:
s301: and the EDI server receives the service file and uploads the service file to the object storage service.
Specifically, the EDI server receives a service file sent by a service sending end and uploads the service file to an object storage service. The service system which can be used for sending the service file is deployed on the service sending end. The service sending end can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers and the like.
S302: and the object storage service stores the business file and returns the file ID of the business file to the EDI server.
After the object storage service receives and stores the business file uploaded by the EDI server, the file ID of the business file, that is, the globally Unique Identifier (UID) of the business file, can be generated. The file ID can be used for searching the corresponding service file, and the server and the user can find the corresponding service file through the file ID without knowing the physical address of the service file.
S303: and the EDI server generates a service receiving message according to the file ID and sends the service receiving message to a message middleware.
After receiving the file ID returned by the object storage service, the EDI server can assemble and generate a service receiving message containing the file ID according to the file ID and send the service receiving message to a service receiving queue of the message middleware. Since there is a one-to-one correspondence between the file ID and the service file, the service file is stored in the service reception message in the form of a file ID.
In an exemplary embodiment, during the process that the EDI server sends the service receiving message to the service receiving queue of the message middleware, the EDI server stores the receiving record of the service file (file to be received). Wherein the reception record includes a file ID, a reception status, a reception record ID, a reception port ID, and the like of the service file. Preferably, the EDI server may persistently store the reception record to ensure that the reception record is not lost, thereby facilitating subsequent update of the reception record.
For example, in the process that the EDI server sends the service sending message of the service file 1 to the service receiving queue of the message middleware, the EDI server stores the receiving record of the service file 1. The format of the transmission record may be as follows:
file ID | Receiving state | Receiving a record ID | Receiving port ID |
ID 1 | In reception | 1 | 1 |
In an exemplary embodiment, the message middleware can return a transmission confirmation to the EDI server in response to receiving the service reception message. The sending confirmation receipt can be used for helping the EDI server to confirm that the service receiving message sent to the message middleware by the EDI server is successfully received by the message middleware.
Specifically, after receiving a service reception message sent by the EDI server, the service reception queue of the message middleware can persist the service reception message until the service reception message is completely processed (consumed). It should be noted that before a message is deleted from the message middleware, the processing system is required to explicitly indicate that the message has been processed, so as to ensure that the message is safely stored until the message is used up, thereby avoiding the risk of data loss.
S304: and the service receiving end responds to the service receiving message in the message middleware to execute the receiving of the service file.
It should be noted that, a service system that can be used for receiving the service file is deployed on the service receiving end. The service receiving end can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers and the like. The user can realize various interactions with the service system based on the service receiving end.
Specifically, the service receiving end can monitor the message in the message middleware, and after the service receiving end monitors the service receiving message in the message middleware, the service receiving end can execute receiving of the service file according to the service receiving message.
In an exemplary embodiment, a service receiving end responds to the service receiving message in the message middleware, and analyzes the service receiving message to check whether configuration information is correct; after the verification is passed, the service receiving end downloads and stores the service file from the object storage service, namely, the service file is received.
Specifically, after the service receiving message is analyzed, the file ID included in the service receiving message can be obtained, and the corresponding service file can be found from the object storage service according to the file ID, so that the downloading of the service file in the object storage service can be realized.
It should be noted that the verification configuration information specifically includes: checking port information, such as whether a port exists or not, whether an encryption certificate is in a valid period or not and the like; and checking file information, such as whether a service file exists or not, whether the size of the service file exceeds the maximum limit or not, and the like.
Specifically, after monitoring the service transmission message, the service receiving end may perform persistent storage of a reception record (including a file ID, a reception status, and the like), and may update the reception status in the reception record to "reception complete" after completing reception of the service file.
In summary, the service receiving method provided by the present invention uploads the service file to be received to the object storage service to generate the file ID corresponding to the service file, and transmits the file ID to the service receiving end instead of the service file itself, so as to isolate the download load of the service file, and the EDI server does not cause call blocking due to the download of the service file. Moreover, the service receiving information is sent and monitored through the message middleware, the service system is informed of confirmation of file receiving through the message queue, timeliness is good, transmission butt joint of a service receiving end and an EDI server can be decoupled, receiving of service files is asynchronously executed, the method and the device are suitable for abnormal conditions such as network abnormality and instability, and stability of service file receiving is improved.
Referring to fig. 4, based on the same inventive concept as the aforementioned service receiving method, an embodiment of the present invention provides a service receiving system 400, which includes: a service receiver 401, an object storage service 402, message middleware 403, and an EDI server 404.
The object storage service 402 is configured to store the service file uploaded by the EDI server 404, and return the file ID of the service file to the EDI server 404. The EDI server 404 is configured to generate a service receiving message according to the file ID, and send the service receiving message to the message middleware 403. The service receiving end 401 is configured to respond to the service receiving message in the message middleware 403 to perform receiving of the service file.
The service receiver 401, the object storage service 402, the message middleware 403 and the EDI server 404 are communicatively connected through a network 405. Network 405 serves as a medium for providing communication links between service receiver 401, object storage service 402, message middleware 403, and EDI server 404. The network 405 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The service receiving end 401 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like. Object storage service 402 may be the Alice cloud, huashi cloud, tencent cloud, and so on. The message middleware 403 may be RabbitMQ, activeMQ, kafka, etc. The EDI server 404 may be various servers in which an EDI system is deployed, for example, an independent physical server, a server cluster or a distributed system configured by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
In an exemplary embodiment, during the process that the EDI server 404 sends the service receiving message to the service receiving queue of the message middleware 403, the EDI server 404 stores the receiving record of the service file (file to be received). Wherein the reception record includes a file ID, a reception status, a reception record ID, a reception port ID, and the like of the service file. Preferably, the EDI server 404 may persist the aforementioned reception record to ensure that the reception record is not lost, facilitating subsequent updates to the reception record.
In an exemplary embodiment, the message middleware 403 can return a transmission confirmation to the EDI server 404 in response to the service reception message received. The transmission confirmation receipt may be used to help the EDI server 404 confirm that the service reception message transmitted to the message middleware 403 has been successfully received by the message middleware 403.
In an exemplary embodiment, the service receiving end 401 can respond to the service receiving message in the message middleware 403, and parse the service receiving message to check whether the configuration information is correct; after the verification is passed, the service receiving end 401 can download and store the service file from the object storage service 402.
It should be noted that the verification configuration information specifically includes: checking port information, such as whether a port exists or not, whether an encryption certificate is in a valid period or not and the like; and checking file information, such as whether a service file exists or not, whether the size of the service file exceeds the maximum limit or not, and the like.
Referring to fig. 5, an embodiment of the present invention further provides an electronic device 500, where the electronic device 500 includes at least one processor 501, a storage 502 (e.g., a non-volatile storage), a memory 503 and a communication interface 504, and the at least one processor 501, the storage 502, the memory 503 and the communication interface 504 are connected together via a bus 505. The at least one processor 501 is configured to invoke the at least one program instruction stored or encoded in the memory 502 to cause the at least one processor 501 to perform various operations and functions of the service transmission method or the service reception method described in the various embodiments of the present specification.
In embodiments of the present description, the electronic device 500 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, personal Digital Assistants (PDAs), handsets, messaging devices, wearable electronic devices, consumer electronic devices, and the like.
An embodiment of the present invention further provides a computer-readable medium, where the computer-readable medium carries computer execution instructions, and the computer execution instructions, when executed by a processor, are configured to implement various operations and functions of a service sending method or a service receiving method described in various embodiments of this specification.
The computer readable medium in the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.
Claims (14)
1. A method for transmitting a service, comprising:
the service sending terminal uploads the service file to the object storage service;
the object storage service stores the service file and returns the file ID of the service file to the service sending end;
the service sending end generates a service sending message according to the file ID and sends the service sending message to a message middleware;
and the EDI server responds to the service transmission message in the message middleware to execute the transmission of the service file.
2. The service transmission method of claim 1, wherein the method further comprises:
and the service sending end stores a sending record of the service file, wherein the sending record comprises the file ID and the sending state of the service file.
3. The service transmission method of claim 1, wherein the method further comprises:
and the message middleware responds to the received service sending message and returns a sending confirmation receipt to the service sending end.
4. The service transmission method according to claim 1, wherein the EDI server performs the transmission of the service file in response to the service transmission message in the message middleware, including:
responding to the service sending message in the message middleware by the EDI server, and analyzing the service sending message to check whether the configuration information is correct or not;
and after the verification is passed, the EDI server downloads the service file from the object storage service and sends the service file to a service receiving end.
5. The service transmission method of claim 4, wherein the method further comprises:
determining whether the service file is successfully transmitted;
when the service file is successfully transmitted, returning a transmission result to the EDI server;
the EDI server updates a service transmission record according to the sending result and sends the sending result to the message middleware;
and the service sending end responds to the sending result in the message middleware and updates the sending record of the service file.
6. The service transmission method of claim 5, wherein the method further comprises:
when the service file is failed to be sent, the EDI server sends a service retransmission message to the message middleware;
and the EDI server responds to the service retransmission message in the message middleware and re-executes the transmission of the service file.
7. A method for receiving a service, comprising:
the EDI server receives the business file and uploads the business file to an object storage service;
the object storage service saves the business file and returns the file ID of the business file to the EDI server;
the EDI server generates a service receiving message according to the file ID and sends the service receiving message to a message middleware;
and the service receiving end responds to the service receiving message in the message middleware to execute the receiving of the service file.
8. The service reception method of claim 7, wherein the method further comprises:
and the EDI server stores a receiving record of the service file, wherein the receiving record comprises the file ID and the receiving state of the service file.
9. The service reception method of claim 7, wherein the method further comprises:
and the message middleware responds to the received service receiving message and returns a sending confirmation receipt to the service sending end.
10. The service reception method of claim 7, wherein the service reception end performs reception of the service file in response to the service reception message in the message middleware, comprising:
the service receiving end responds to the service receiving message in the message middleware and analyzes the service receiving message to check whether the configuration information is correct or not;
and after the verification is passed, the business receiving end downloads and stores the business file from the object storage service.
11. A traffic transmission system, comprising: the system comprises a service sending end, an object storage service, message middleware and an EDI server;
the object storage service is used for storing the service file uploaded by the service sending end and returning the file ID of the service file to the service sending end;
the service sending end is used for generating a service sending message according to the file ID and sending the service sending message to the message middleware;
the EDI server is used for responding to the service transmission message in the message middleware to execute the transmission of the service file.
12. A service reception system, comprising: the system comprises a business receiving end, an object storage service, message middleware and an EDI server;
the object storage service is used for storing the service file uploaded by the EDI server and returning the file ID of the service file to the EDI server;
the EDI server is used for generating a service receiving message according to the file ID and sending the service receiving message to the message middleware;
the service receiving end is used for responding to the service receiving message in the message middleware to execute the receiving of the service file.
13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the service transmission method according to any one of claims 1 to 6 or the service reception method according to any one of claims 7 to 10 when executing the program.
14. A computer-readable medium carrying computer-executable instructions which, when executed by a processor, are configured to implement the service transmission method according to any one of claims 1 to 6 or the service reception method according to any one of claims 7 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211559528.3A CN115866043A (en) | 2022-12-06 | 2022-12-06 | Service sending method and system, service receiving method and system, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211559528.3A CN115866043A (en) | 2022-12-06 | 2022-12-06 | Service sending method and system, service receiving method and system, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115866043A true CN115866043A (en) | 2023-03-28 |
Family
ID=85670471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211559528.3A Pending CN115866043A (en) | 2022-12-06 | 2022-12-06 | Service sending method and system, service receiving method and system, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115866043A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932431A (en) * | 2012-10-12 | 2013-02-13 | 宁夏电力公司电力科学研究院 | Message-routing-based state monitoring data interface configuration method |
CN111666745A (en) * | 2020-06-03 | 2020-09-15 | 中国建设银行股份有限公司 | File downloading method, device, server and medium |
CN112905707A (en) * | 2021-03-31 | 2021-06-04 | 浙江太美医疗科技股份有限公司 | Method and device for synchronizing relational database and search engine and computer storage medium |
CN114090528A (en) * | 2021-11-26 | 2022-02-25 | 中国邮政储蓄银行股份有限公司 | Cross-center file synchronization method, system and computer readable storage medium |
-
2022
- 2022-12-06 CN CN202211559528.3A patent/CN115866043A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932431A (en) * | 2012-10-12 | 2013-02-13 | 宁夏电力公司电力科学研究院 | Message-routing-based state monitoring data interface configuration method |
CN111666745A (en) * | 2020-06-03 | 2020-09-15 | 中国建设银行股份有限公司 | File downloading method, device, server and medium |
CN112905707A (en) * | 2021-03-31 | 2021-06-04 | 浙江太美医疗科技股份有限公司 | Method and device for synchronizing relational database and search engine and computer storage medium |
CN114090528A (en) * | 2021-11-26 | 2022-02-25 | 中国邮政储蓄银行股份有限公司 | Cross-center file synchronization method, system and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8001529B2 (en) | System and method of testing wireless component applications | |
KR101233263B1 (en) | System and method for providing push service using feedback information | |
CN108377247B (en) | Message pushing method and device | |
CN113630465B (en) | Message processing method, device, equipment and storage medium | |
CN109614439B (en) | Data synchronization method, device, electronic equipment and storage medium | |
CN112714158B (en) | Transaction processing method, relay network, cross-link gateway, system, medium and equipment | |
CN103281192B (en) | Method, device and system for retrieving data | |
CN104579905A (en) | Message passing method and system, MOM (message oriented middleware) server and receiving terminal | |
CN113391979A (en) | Processing method, equipment and system for monitoring data display and storage medium | |
CN110324384B (en) | Data pushing method and device | |
CN111818179A (en) | User request processing method and device, computing equipment and medium | |
CN111726401A (en) | File transmission method and device | |
CN114793232B (en) | Service processing method, device, electronic equipment and storage medium | |
CN115866043A (en) | Service sending method and system, service receiving method and system, equipment and medium | |
CN114257632B (en) | Method and device for reconnecting broken wire, electronic equipment and readable storage medium | |
CN113783666B (en) | Method and device for processing business | |
CN110278133B (en) | Checking method, device, computing equipment and medium executed by server | |
CN112272211A (en) | Service request processing method, device and system | |
CN111552907A (en) | Message processing method, device, equipment and storage medium | |
CN111338642A (en) | Method, device, terminal and storage medium for determining application downloading path | |
CN111210349A (en) | Virtual asset transfer hosting method and device, electronic equipment and storage medium | |
CN112035143A (en) | Interface information updating method, node and system based on block chain | |
CN110764932A (en) | Data processing method, system, medium and computing device | |
JP2015001777A (en) | System and method for simultaneously debugging a plurality of mobile terminals | |
CN117170941B (en) | Data backup method, device, electronic equipment and 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 |