Business data processing method, device, electronic device and storage medium
By determining the sending link and selecting the message delivery component, the problem of low scalability of message delivery in the prior art is solved, and efficient message delivery and scalability of the service system is realized.
Patent Information
- Application Number
- CN202210147875.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-02-17
AI Technical Summary
In the prior art, messaging is not scalable, resulting in low messaging efficiency within the business system and between third-party platforms and high maintenance costs.
By obtaining the identity of the sender and the receiver, determining the sending link and obtaining the message sending policy from the pre-stored mapping table, selecting the appropriate message delivery component, and encapsulating the message packet according to the transmission protocol for sending.
It realizes the addition of new message delivery components according to business expansion, improves the maintainability and scalability of the business system, and enables the business system to efficiently transmit messages with internal and external business platforms.
Smart Images

Figure CN114816785B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of message push technology, and in particular to a business data processing method, device, electronic device and storage medium. Background Art
[0002] In the prior art, message middleware is mostly used to send messages between business platforms within a business system. If the messages between two business platforms are not transmitted based on message middleware, a message sending device needs to be specially created and maintained for them. The message transmission efficiency is low and the maintenance cost is high. In addition, the business platform within the business system cannot transmit messages to third-party business platforms. Summary of the invention
[0003] The purpose of the present invention is to provide a business data processing method, device, electronic device and storage medium to solve the technical problem of low scalability of message transmission in the prior art.
[0004] The technical solution of the present invention is as follows: a business data processing method is provided, comprising:
[0005] Obtaining a message sending request from a sender, and generating corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier, and message content;
[0006] Determine a sending link according to the sender identifier and the receiver identifier, and obtain a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record the association relationship between the sending link and the message sending strategy, and the message sending strategy is used to characterize the message sending method;
[0007] Selecting a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data;
[0008] The message data is encapsulated into a message data packet according to the transmission protocol corresponding to the target message delivery component, and the target message delivery component is called to send the message data packet to a recipient.
[0009] Optionally, before determining the sending link according to the sender identifier and the receiver identifier, and acquiring a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, the method further includes:
[0010] Acquire all business terminals of the business system, wherein the business terminals include business platforms and server terminals;
[0011] For each of the service terminals, taking other service terminals in the service system and third-party service terminals as the receivers, respectively obtaining the sending links with the service terminal as the sender;
[0012] The message sending strategy of each sending link is obtained, and a first mapping table for recording the association relationship between the sending link and the message sending strategy is created.
[0013] Optionally, encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and before calling the target message delivery component to send the message data packet to the recipient, further includes:
[0014] The message data is encrypted or authenticated according to the message sending policy.
[0015] Optionally, the encrypting or authenticating the message data according to the message sending policy includes:
[0016] If the recipient is a third-party business platform, the metadata information of the sender is obtained, and whether the sender has the authority to send data out is determined according to the metadata information;
[0017] If the sender has the authority to send data outward, the authentication is passed;
[0018] If the recipient is a business platform of the business system, determining whether the recipient has access rights to the message content;
[0019] If the judgment result is yes, then executing the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component;
[0020] If the judgment result is no, the message content is encrypted and the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component is executed.
[0021] Optionally, after calling the target message delivery component to send the message data packet to the recipient, the method further includes:
[0022] If the message data packet fails to be sent, adding a sending failure status tag to the message data packet;
[0023] Acquire the message data packet carrying the sending failure status tag, add one to the number of calls of the message data packet, and call the target message delivery component to send the message data packet to the recipient;
[0024] If the number of calls is greater than a preset number threshold, adding an alarm tag to the message data packet;
[0025] If the message data packet is sent successfully, a sending success status tag is added to the corresponding message data.
[0026] Optionally, after calling the target message delivery component to send the message data packet to the recipient, the method further includes:
[0027] Receiving a maintenance instruction, wherein the maintenance instruction includes an identifier of the service platform to be maintained and a modified transmission protocol;
[0028] Acquire the sending link with the service platform to be maintained as the receiver, and determine a modified message sending strategy according to the modified transmission protocol;
[0029] The acquired message sending policy associated with the sending link is updated to the modified message sending policy, and an updated first mapping table is obtained.
[0030] Optionally, the message data also includes a business type;
[0031] After calling the target message delivery component to send the message data packet to the recipient, the method further includes:
[0032] For each of the service types, obtaining a sending link corresponding to the message data carrying the sending success status tag;
[0033] A calling link of the service type is obtained according to the sending link.
[0034] Another technical solution of the present invention is as follows: a business data processing device is provided, comprising:
[0035] A receiving module, used to obtain a message sending request from a sender, and generate corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier, and message content;
[0036] a strategy determination module, configured to determine a sending link according to the sender identifier and the receiver identifier, and to obtain a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record an association relationship between the sending link and the message sending strategy, and the message sending strategy is used to characterize a message sending method;
[0037] A selection module, configured to select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data;
[0038] The sending module is used to encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the recipient.
[0039] Another technical solution of the present invention is as follows: an electronic device is provided, comprising a processor and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the above-mentioned business data processing method is implemented.
[0040] Another technical solution of the present invention is as follows: a storage medium is provided, wherein program instructions are stored in the storage medium, and the program instructions implement the above-mentioned business data processing method when executed by a processor.
[0041] The business data processing method, device, electronic device and storage medium of the present invention obtain a message sending request of a sender, generate corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier and a message content; determine a sending link according to the sender identifier and the receiver identifier, and obtain a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record the association relationship between the sending link and the message sending strategy, and the message sending strategy is used to characterize the message sending mode; select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data; encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the receiver; through the above method, a new message delivery component can be added according to business expansion, and when a new business platform is added to the business system, a new sending link can be added for the business platform as the sender and the receiver, and the original message delivery component is selected for the new sending link or a new message delivery component is established, thereby improving the maintainability and scalability of the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a process flow of a business data processing method according to a first embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a flow chart of a business data processing method according to a second embodiment of the present invention;
[0044] Figure 3 A schematic diagram of the structure of a service data processing device according to a third embodiment of the present invention;
[0045] Figure 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention;
[0046] Figure 5 FIG. 5 is a schematic diagram of the structure of a storage medium according to a fifth embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The terms "first", "second" and "third" in the present invention are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0049] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0050] Figure 1 FIG. 1 is a flow chart of a business data processing method according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the method of FIG. 1 if the results are substantially the same. Figure 1 The process sequence shown is limited. Figure 1 As shown, the business data processing method includes the steps of:
[0051] S101, obtaining a message sending request from a sender, and generating corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier, and message content.
[0052] Among them, the sender and the receiver can be the business platform (application platform) inside the business system respectively, and the business platform can include but is not limited to the first management platform, X-type insurance application platform, Y-type insurance application platform, query tool, data mining tool, A analysis platform, B display platform, etc. For example, in the scenario of feedback query data, the sender is the query tool, the receiver is the A analysis platform, and the query tool (sender) queries the corresponding data and then feeds back the obtained data to the A analysis platform (receiver); in the scenario of sending data query request, the sender is the B analysis platform, the receiver is the query tool, and the B analysis platform (sender) sends the target to be queried to the query tool (receiver). Among them, the receiver can also be a server, the sender can be a business platform, and the business platform (sender) sends a message to the corresponding business server (receiver). That is to say, in this embodiment, the execution subject is a message notification server, which is used to send the sender's message to the receiver, and the sender of one message can be the receiver of another message. Among them, the receiver can also be a business platform or server of a third-party system, and the sender is a business platform or business server inside the business system.
[0053] Among them, after obtaining the message sending request of the sender, the message content, sender and receiver in the message sending request are extracted, the corresponding sender identifier of the sender and the receiver identifier of the receiver are obtained, and a unique message identification code is configured for the message content, and then the message identification code, sender identifier, receiver identifier and message content are generated into a message data for storage. Specifically, the sender identifier is used to characterize the sender, the receiver identifier is used to characterize the receiver, the message identification code can be generated by date and number, and the message identification code is used to characterize the message sending request, which is convenient for subsequent query and backtracking.
[0054] S102, determining a sending link according to the sender identifier and the receiver identifier, and obtaining a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record an association between the sending link and the message sending strategy, and the message sending strategy is used to characterize a message sending method.
[0055] Among them, for the same sender, sending links can be formed with different receivers respectively, the sending link is determined by the sender identifier and the receiver identifier, and the sending link and the corresponding message sending strategy are recorded in the first mapping table.
[0056] Among them, the message sending strategy is used to characterize the message sending method. Furthermore, the message sending strategy is also used to characterize the message sending encryption processing method, the message sending authentication processing method and the message sending failure processing method. Specifically, the message sending method includes the message middleware sending method, the TCP / IP (Transmission Control Protocol / Internet Protocol) sending method, the HTTP (Hyper Text TransferProtocol) sending method, the SMS sending method and the custom sending method within the business system. In addition, the message middleware may further include but is not limited to KAFKA, ACTIVE MQ, RABBIT MQ, SOFA MQ, ROCKETMQ and TENCENT MQ. In the message sending server, sending modules corresponding to different message sending methods are established respectively, and the message data is sent through the corresponding sending modules.
[0057] In an optional implementation, the following steps are further included before step S102:
[0058] S201, acquiring all business terminals of a business system, wherein the business terminals include a business platform and a server terminal;
[0059] S202, for each of the service terminals, taking other service terminals in the service system and third-party service terminals as the receivers, respectively acquiring the sending links with the service terminal as the sender;
[0060] S203: Obtain a message sending strategy for each of the sending links, and create a first mapping table for recording an association relationship between the sending links and the message sending strategies.
[0061] Specifically, when the sender and receiver are determined, the message sending method between them is determined, and the message sending strategy is also determined. In actual use, the business terminals within the business system will transmit messages to each other, and some business terminals within the business system will also transmit messages to specific third-party business terminals. Generally, the message sending method in the message sending strategy is determined by the receiver, and the message sending encryption processing method, message sending authentication processing method and message sending failure processing in the message sending strategy are jointly determined by the sender and the receiver. When the same business terminal is the receiver, the encryption processing method, authentication method and sending failure processing method may be different for different senders.
[0062] S103: Select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data.
[0063] Among them, the message delivery component can be a multi-threaded message sending component, which can process and send multiple message data packets at the same time to meet the batch packaging and sending of massive message data packets. Specifically, the message sending methods in the message sending strategy correspond to different transmission protocols and need to be sent through different message delivery components. For example, the message sending methods can correspond to the Message Queuing Telemetry Transport (MQTT) protocol, the Transmission Control Protocol / Internet Protocol (TCP / IP) protocol, the Hyper Text Transfer Protocol (HTTP) protocol, the Short Message Protocol (SMP), a custom protocol, etc.
[0064] S104: encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to a recipient.
[0065] Among them, different transmission protocols can correspond to different data formats, and the message data can be packaged and encapsulated into message data packets according to the corresponding data formats. Different transmission protocols can also correspond to the same data format. For example, in order to increase the reusability of the API interface, the message data of the recipients of each business platform within the business system can be encapsulated into a message data packet in JSON format. The message delivery component will send the message data packets obtained from multiple senders to different recipients by calling the same internal push service API interface. In this way, recipients of the same type can share a message delivery component. Set up a special message delivery component for the third-party business platform, such as China Mobile, China Unicom, and China Telecom servers. The transmission protocol is the SMS protocol. The message data is packaged and encapsulated into a message data packet in PDU format and then sent.
[0066] In this embodiment, the message sending server adopts an extensible message notification framework, and new message delivery components can be added according to business expansion. When a new business platform is added to the business system, a new sending link can be added for the business platform as the sender and receiver, and the original message delivery component can be selected for the new sending link or a new message delivery component can be established, thereby improving the maintainability and scalability of the business system.
[0067] In an optional implementation, the message sending strategy is also used to characterize a message sending failure processing method, and after step S104, the following steps are further included:
[0068] S301, if the message data packet fails to be sent, adding a sending failure status tag to the message data packet;
[0069] S302, obtaining the message data packet carrying the sending failure status tag, accumulating the number of calls of the message data packet by one, and calling the target message delivery component to send the message data packet to the recipient;
[0070] S303, if the number of calls is greater than a preset number threshold, adding an alarm tag to the message data packet;
[0071] S304: If the message data packet is sent successfully, a sending success status tag is added to the corresponding message data.
[0072] In this embodiment, the message data packets that failed to be sent are marked and resent, and the number of resends is accumulated. If the number of resends is too many, an alarm tag is added to it to facilitate the subsequent triggering of the alarm rule. For the message data packets that are sent successfully, a successful sending tag is added to the corresponding message data.
[0073] In an optional implementation, when a transmission protocol of a service platform in the service system as a receiver changes, the corresponding message sending strategy can be directly modified in the first mapping table. Specifically, after step S104, the following steps are also included:
[0074] S401, receiving a maintenance instruction, wherein the maintenance instruction includes an identifier of a service platform to be maintained and a modified transmission protocol;
[0075] S402, obtaining the sending link with the service platform to be maintained as the receiver, and determining a modified message sending strategy according to the modified transmission protocol;
[0076] S403: Update the acquired message sending policy associated with the sending link to the modified message sending policy, and acquire an updated first mapping table.
[0077] In this embodiment, a modified message sending method is determined according to the modified transmission protocol, and a modified message sending strategy is determined according to the modified message sending method, so as to uniformly update the message sending strategies associated with all sending links of the service platform to be maintained in the first mapping table.
[0078] In an optional implementation, based on steps S401 to S404, since the message sending server stores the message data, the call link between the service platforms can be presented through the sending link of the message data, and the message data further includes the service type. After step S104, the following steps are also included:
[0079] S501, for each of the service types, obtaining a sending link corresponding to the message data carrying the sending success status tag;
[0080] S502: Acquire a calling link of the service type according to the sending link.
[0081] Among them, for two sending links, if the receiver of one sending link is the sender of the other sending link, the two sending links are connected to form a call link of this business type, and the relationship between various business platforms related to this business type is displayed through message data.
[0082] Furthermore, the above-mentioned business data processing flow can be constructed based on artificial intelligence, and the sending link of related messages can be identified and sent based on artificial intelligence technology to realize unattended artificial intelligence message push. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0083] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0084] Figure 2 FIG. 1 is a flow chart of a business data processing method according to a second embodiment of the present invention. It should be noted that if substantially the same results are achieved, the method of the present invention is not limited to the method of FIG. Figure 2 The process sequence shown is limited. Figure 2 As shown, the business data processing method includes the steps of:
[0085] S601, obtaining a message sending request from a sender, and generating corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier, and message content.
[0086] S602, determine the sending link according to the sender identifier and the receiver identifier, and obtain the corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record the association relationship between the sending link and the message sending strategy, and the message sending strategy is used to characterize the message sending method.
[0087] S603: Select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data.
[0088] S604: Encrypt or authenticate the message data according to the message sending policy.
[0089] In this embodiment, the message sending policy is also used to characterize the message sending encryption processing method, the message sending authentication processing method, and the message sending failure processing method. Among them, the message data is processed according to the encryption processing method or the authentication processing method recorded in the message sending policy. For example, when the recipient is a third-party business platform, the sensitive data that may be involved in the message data needs to be encrypted, and the sender needs to be authenticated to see whether it has the authority to send out. The message data can only be packaged and sent after the encryption processing is completed or the authentication processing is passed. For another example, different business platforms have different access rights to data. The message content in the message data may come from a data table stored in a database in the business system. The data table includes multiple fields, and the fields may involve sensitive data such as customer identity information or privacy information (ID number, whether suffering from a certain disease, communication address, etc.). The first management platform has access rights to each field in the data table. The data mining tool has no access rights to the fields corresponding to sensitive data in the data table, but has access rights to the fields corresponding to non-sensitive data. If the first management platform is the recipient, no encryption processing is required; if the data mining tool is the recipient, it is necessary to determine whether the message content of the message data involves data in sensitive fields. If the message content includes data in sensitive fields, the sensitive data needs to be encrypted. Specifically, in step S604, if the recipient is a third-party business platform, the metadata information of the sender is obtained, and whether the sender has the data outbound permission is determined based on the metadata information; if the sender has the data outbound permission, the authentication is passed; if the recipient is a business platform of a business system, it is determined whether the recipient has access rights to the message content; if the judgment result is yes, step S104 is directly executed; if the judgment result is no, the message content is encrypted and then step S104 is executed. In actual applications, for messages sent to third-party business platforms, strict verification processing will be performed before sending to the message sending server. In the message sending server, only the sender's outbound permission is authenticated, and there is no need to process the message data.
[0090] S605: encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the recipient.
[0091] In this embodiment, steps S601 to S603 and step S605 refer to the description of steps S101 to S104 in the first embodiment for details.
[0092] In this embodiment, based on the extensible message notification framework, the focus is on solving how to reduce the complexity brought by complex and diverse message notifications in the business system, and improve the system development efficiency and extensibility. By abstracting application information, it is responsible for uniformly maintaining the basic information, notification method, notification address, exception handling rules, alarm rules and other information of each application interface. By abstracting message information, such as: message number, message type, sender, receiver, message body, number of calls, delivery status, etc., unified maintenance and management of messages is achieved. The asynchronous message notification framework automatically loads the service party meta information, finds the service party information that needs to be delivered according to the message meta information, and automatically determines which method should be used for message delivery according to the rules. The system has built-in commonly used message delivery methods and also supports fast custom delivery methods. Message delivery failure automatically triggers strategies, such as: retry, alarm and other strategies. In the asynchronous message notification framework, the message middleware is only a channel for message delivery, which reduces the dependence on a single message middleware. The framework has built-in multiple message delivery channels, enriched the message notification methods, and supports the rapid expansion of personalized message delivery methods based on the framework's public services. It is flexible to use, highly scalable, improves development efficiency, and reduces development costs.
[0093] The business data processing method of this embodiment can provide a more flexible and controllable message delivery method. It can not only integrate the existing message middleware, but also has built-in commonly used notification methods. It can also integrate customized notification functions according to different scenario requirements, thereby improving the maintainability and scalability of the system.
[0094] Figure 3 FIG. 1 is a schematic diagram of the structure of a service data processing device according to a third embodiment of the present invention. Figure 3 As shown, the business data processing device 30 includes: a receiving module 31, a policy determination module 32, a selection module 33 and a sending module 34, wherein the receiving module 31 is used to obtain a message sending request from a sender, and generate corresponding message data according to the message sending request, wherein the message data includes a sender identifier, a receiver identifier and a message content; the policy determination module 32 is used to determine a sending link according to the sender identifier and the receiver identifier, and obtain a corresponding message sending strategy from a pre-stored first mapping table according to the sending link, wherein the first mapping table is used to record the association relationship between the sending link and the message sending strategy, and the message sending strategy is used to characterize the message sending method; the selection module 33 is used to select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending strategy, wherein the plurality of message delivery components use different transmission protocols to transmit data; the sending module 34 is used to encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the receiver.
[0095] Furthermore, the policy determination module 32 is also used to: obtain all business ends of the business system, wherein the business ends include a business platform and a server end; for each of the business ends, obtain the sending links with the business end as the sender with other business ends in the business system and third-party business ends as the receivers; obtain the message sending policy of each of the sending links, and create a first mapping table for recording the association relationship between the sending links and the message sending policies.
[0096] Furthermore, the sending module 34 is also used to: perform encryption or authentication processing on the message data according to the message sending strategy.
[0097] Furthermore, the sending module 34 is also used for: if the recipient is a third-party business platform, obtaining the metadata information of the sender, and judging whether the sender has the authority to send data outward according to the metadata information; if the sender has the authority to send data outward, the authentication is passed; if the recipient is a business platform of a business system, judging whether the recipient has access rights to the message content; if the judgment result is yes, executing the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component; if the judgment result is no, encrypting the message content, and executing the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component.
[0098] Furthermore, the sending module 34 is also used for: if the message data packet fails to be sent, adding a sending failure status label to the message data packet; obtaining the message data packet carrying the sending failure status label, accumulating the number of calls of the message data packet by one, and calling the target message delivery component to send the message data packet to the recipient; if the number of calls is greater than a preset number threshold, adding an alarm label to the message data packet; if the message data packet is sent successfully, adding a sending success status label to the corresponding message data.
[0099] Furthermore, the sending module 34 is also used to: receive maintenance instructions, wherein the maintenance instructions include the business platform identifier to be maintained and the modified transmission protocol; obtain the sending link with the business platform to be maintained as the receiver, and determine the modified message sending strategy according to the modified transmission protocol; update the message sending policy associated with the obtained sending link to the modified message sending strategy, and obtain the updated first mapping table.
[0100] The message data also includes a business type; further, the sending module 34 is also used to: for each of the business types, obtain a sending link corresponding to the message data carrying the sending success status tag; and obtain a calling link of the business type according to the sending link.
[0101] Figure 4 Schematic diagram of the structure of the electronic device according to the fourth embodiment of the present invention. Figure 4 As shown, the electronic device 40 includes a processor 41 and a memory 42 coupled to the processor 41 .
[0102] The memory 42 stores program instructions for implementing the business data processing method of any of the above embodiments.
[0103] The processor 41 is used to execute program instructions stored in the memory 42 to schedule the parts outsourcing order.
[0104] The processor 41 may also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip having signal processing capabilities. The processor 41 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0105] See also Figure 5 , Figure 5 It is a structural diagram of the storage medium of the fifth embodiment of the present invention. The storage medium of the embodiment of the present invention stores program instructions 51 that can implement all the above methods, and the storage medium can be non-volatile or volatile. Among them, the program instructions 51 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, tablets, etc.
[0106] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.
[0108] The above description is only an implementation mode of the present invention. It should be pointed out that, for ordinary technicians in this field, improvements can be made without departing from the creative concept of the present invention, but these all belong to the protection scope of the present invention.
Claims
1. A method for processing service data, characterized in that, it includes: Obtain the message sending request of the sender, and generate corresponding message data according to the message sending request, where the message data includes a sender identifier, a receiver identifier, and a message content; Determine the sending link according to the sender identifier and the receiver identifier, and obtain the corresponding message sending policy from a pre-stored first mapping table according to the sending link, where the first mapping table is used to record the association relationship between the sending link and the message sending policy, and the message sending policy is used to characterize the message sending method; Select a corresponding target message delivery component from multiple pre-established message delivery components according to the message sending policy, where the multiple message delivery components transmit data using different transmission protocols; Encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the receiver; The message data further includes a service type; After calling the target message delivery component to send the message data packet to the receiver, it further includes: For each service type, obtain the sending link corresponding to the message data carrying the sending success status tag; Obtain the call link of the service type according to the sending link, where for two sending links, if the receiver of one sending link is the sender of the other sending link, then connect the two sending links to form the call link of the service type.
2. The service data processing method according to claim 1, characterized in that, before determining the sending link according to the sender identifier and the receiver identifier, and obtaining the corresponding message sending policy from the pre-stored first mapping table according to the sending link, it further includes: Obtain all service terminals of the service system, where the service terminals include a service platform and a server terminal; For each service terminal, obtain the sending link with the service terminal as the sender respectively with other service terminals and third-party service terminals in the service system as the receivers; Obtain the message sending policy of each sending link, and create a first mapping table for recording the association relationship between the sending link and the message sending policy.
3. The service data processing method according to claim 1, characterized in that, before encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and calling the target message delivery component to send the message data packet to the receiver, it further includes: Perform encryption processing or authentication processing on the message data according to the message sending policy.
4. The service data processing method according to claim 3, characterized in that, performing encryption processing or authentication processing on the message data according to the message sending policy includes: If the receiver is a third-party service platform, obtain the metadata information of the sender, and judge whether the sender has the right to send data out according to the metadata information; If the sender has the right to send data out, the authentication is passed; If the recipient is the business platform of the business system, determine whether the recipient has access rights to the message content; If the judgment result is yes, execute the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component; If the judgment result is no, encrypt the message content and execute the step of encapsulating the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component.
5. The business data processing method according to claim 1, characterized in that, after calling the target message delivery component to send the message data packet to the recipient, further comprising: If the message data packet fails to be sent, add a send failure status tag to the message data packet; Obtain the message data packet with the send failure status tag, increment the call count of the message data packet by one, and call the target message delivery component to send the message data packet to the recipient; If the call count is greater than the preset count threshold, add an alarm tag to the message data packet; If the message data packet is successfully sent, add a send success status tag to the corresponding message data.
6. The business data processing method according to claim 1, characterized in that, after calling the target message delivery component to send the message data packet to the recipient, further comprising: Receive a maintenance instruction, where the maintenance instruction includes the business platform identifier to be maintained and the modified transmission protocol; Obtain the sending link with the business platform to be maintained as the recipient, and determine the modified message sending policy according to the modified transmission protocol; Update the message sending policy associated with the obtained sending link to the modified message sending policy, and obtain the updated first mapping table.
7. A business data processing device, characterized in that, comprising: A receiving module, configured to obtain a message sending request from a sender, and generate corresponding message data according to the message sending request, where the message data includes a sender identifier, a recipient identifier, and message content; A policy determination module, configured to determine a sending link according to the sender identifier and the recipient identifier, and obtain a corresponding message sending policy from a pre-stored first mapping table according to the sending link, where the first mapping table is used to record the association relationship between the sending link and the message sending policy, and the message sending policy is used to represent the message sending method; A selection module, configured to select a corresponding target message delivery component from a plurality of pre-established message delivery components according to the message sending policy, where the plurality of message delivery components use different transmission protocols to transmit data; A sending module, configured to encapsulate the message data into a message data packet according to the transmission protocol corresponding to the target message delivery component, and call the target message delivery component to send the message data packet to the recipient; The message data further includes a service type; the sending module is further configured to, for each of the service types, obtain a sending link corresponding to the message data carrying a sending success status tag; and obtain a call link of the service type according to the sending link, wherein, for two sending links, if the receiver of one sending link is the sender of the other sending link, the two sending links are connected to form a call link of the service type.
8. An electronic device, characterized in that the electronic device includes a processor and a memory coupled to the processor, the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the service data processing method according to any one of claims 1 to 6 is implemented.
9. A storage medium, characterized in that the storage medium stores program instructions, and when the program instructions are executed by a processor, the service data processing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for calling application
CN108632325A
Data processing method and apparatus, electronic device, and computer-readable medium
WO2021259013A1