Message sending method and device, electronic equipment and storage medium
By updating the declaration status in the mapping table and regrouping messages during message sending, the problems of missed and missed sending during batch declaration are solved, and the accuracy and reliability of message sending are improved.
Patent Information
- Application Number
- CN202411593005.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-08
AI Technical Summary
When the existing technology declares cross-border transaction information packets in batches, it is easy to have problems such as missed and missed, resulting in insufficient accuracy and reliability of message transmission.
By determining the content of the message to be declared and the threshold value, the message declaration status in the mapping table is updated, the message is regrouped, and the message content is sent when the threshold condition is met to avoid missed and missed.
It effectively improves the accuracy and reliability of message transmission, avoids missed and missed situations, and ensures the success rate of message transmission.
Smart Images

Figure CN119484377A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a message sending method, device, electronic device and storage medium. Background Art
[0002] Currently, cross-border transaction information messages can be declared in batches through direct system connection. However, this method requires a large number of messages to be declared each time, and omissions and wrong messages are prone to occur during the declaration process. How to improve the accuracy and reliability of message sending during the declaration process is an issue that needs to be addressed urgently. Summary of the invention
[0003] The present invention provides a message sending method, device, electronic device and storage medium to solve the problem of how to improve the accuracy and reliability of message sending in the process of declaring a message.
[0004] According to one aspect of the present disclosure, a method for sending a message is provided, comprising:
[0005] Determine the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported;
[0006] When the content of the message is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure;
[0007] Regrouping the messages whose declaration status is declaration failure in the first mapping table, and determining the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number;
[0008] Based on the business data of the message associated with the first third serial number in the first mapping table, return to execute the operation of determining the content of the message currently to be declared, and send the determined message content when the determined message content is less than or equal to the threshold.
[0009] According to another aspect of the present disclosure, a message sending device is provided, comprising:
[0010] A first determination module, used to determine the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported;
[0011] An updating module, configured to update the declaration status of the messages respectively associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table to declaration failure when the content of the message is greater than a threshold value;
[0012] A second determination module is used to regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number;
[0013] A processing module is used to return to execute the operation of determining the content of the message to be reported currently based on the business data of the message associated with the first third serial number in the first mapping table, and send the determined message content when the determined message content is less than or equal to a threshold.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0015] at least one processor;
[0016] and, a memory communicatively coupled to the at least one processor;
[0017] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the method of the above embodiment.
[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method according to the above embodiment.
[0019] The present disclosure provides a message sending method, device, electronic device and storage medium. First, based on the business data of the message associated with the first sequence number to be reported, the content of the message to be reported is determined. When the content of the message is greater than the threshold, the first sequence number in the first mapping table and the second sequence numbers after the first sequence number are respectively associated with the message. The reporting status of the message is updated to failed reporting, and then the messages with the reporting status of failed reporting in the first mapping table are regrouped to determine the third sequence number corresponding to each group of messages. Finally, based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message to be reported is returned until the determined message content is less than or equal to the threshold, and the determined message content is sent. Thus, when the content of the message associated with the first sequence number to be reported is greater than the threshold, the reporting status of the messages associated with the first sequence number and the second sequence numbers after the first sequence number in the mapping table are respectively updated to failed reporting, and the message grouping is re-performed to determine the third sequence number corresponding to each group, and the operation of determining the content of the message to be reported is returned to execute, and when the content of the message is less than the threshold, the corresponding message content is sent. This effectively avoids the omission and wrong sending of messages during the message sending process, and improves the accuracy and reliability of message sending. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0021] Figure 1 A flowchart of a message sending method provided by an embodiment of the present disclosure;
[0022] Figure 2 A flowchart of a message sending method provided by an embodiment of the present disclosure;
[0023] Figure 3 A flowchart of a message sending method provided by an embodiment of the present disclosure;
[0024] Figure 4 A flowchart of a message sending method provided by an embodiment of the present disclosure;
[0025] Figure 5 A flowchart of a message sending method provided by an embodiment of the present disclosure;
[0026] Figure 6 A schematic diagram of the structure of a message sending device provided in an embodiment of the present disclosure;
[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0028] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0030] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0031] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations.
[0032] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution.
[0033] The message sending method of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0034] Figure 1 A flowchart of a message sending method provided in an embodiment of the present disclosure.
[0035] like Figure 1 As shown, the method includes:
[0036] Step 101, based on the business data of the message associated with the first sequence number currently to be reported, determine the content of the message currently to be reported.
[0037] Among them, the first sequence number can be the declaration group sequence number of the message, which may be associated with the business data of multiple messages, and the present disclosure does not limit this.
[0038] It should be noted that the business data of the message may be any business data. For example, the business data of the message may be cross-border transaction business data, etc., which is not limited in the present disclosure.
[0039] It should be noted that the determined content of the message to be reported can be a message file composed of business data of the message associated with the first serial number, and the present disclosure does not limit this.
[0040] In the present disclosure, before sending a message, the content of the message to be reported can be determined based on the business data of the message associated with the first sequence number to be reported, thereby providing conditions for improving the success rate and reliability of message sending.
[0041] Optionally, when the first sequence number is less than or equal to the maximum sequence number in the first mapping table, it can be determined that there is a message identifier to be reported in the first mapping table. At this time, the content of the current message to be reported can be determined based on the business data of the message associated with the first sequence number, thereby improving the reliability of message sending.
[0042] The first mapping table may be a mapping table for storing the main message identifier to be reported and the sub-message identifiers contained therein.
[0043] It should be noted that the maximum sequence number in the first mapping table may be different if the number of identifiers of the to-be-declared messages contained in the first mapping table is different and / or the method of grouping the to-be-declared messages is different, and the present disclosure does not limit this.
[0044] It should be noted that the present disclosure may also store the business data associated with the first serial number by means of a preset business table, and the present disclosure does not limit this.
[0045] Step 102, when the message content is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure.
[0046] The threshold value may be a specification requirement of the message content for determining whether the message corresponding to the first sequence number can be successfully declared, which may be preset. For example, the threshold value may be that the data volume of the message content is less than or equal to 2 megabytes (MB), etc., and the present disclosure does not limit this.
[0047] Among them, the second serial number can be the group serial number of the subsequent message associated with the current message to be reported in the first mapping table, that is, the message identifier associated with the second serial number and the message identifier associated with the first serial number belong to the same main message identifier, and the present disclosure does not limit this.
[0048] In the present disclosure, after determining the content of the message to be reported, if the message content is greater than a threshold, it can be determined that the message content of the message to be reported does not meet the specification requirements. At this time, the first sequence number in the first mapping table and each second sequence number after the first sequence number can be updated to a failed declaration status, thereby ensuring the accuracy of message sending.
[0049] Step 103, regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number.
[0050] In the present disclosure, after the declaration status of the messages associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure, when the messages associated with the first sequence number and each second sequence number are resent, the messages with a declaration status of declaration failure in the first mapping table can be first regrouped, and the third sequence number corresponding to each group of messages can be determined. Since the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number, the success rate of message sending is improved.
[0051] Step 104, based on the business data of the message associated with the first third sequence number in the first mapping table, returns to perform the operation of determining the content of the message to be reported, and sends the determined message content when the determined message content is less than or equal to the threshold.
[0052] In the present disclosure, after determining the third sequence number corresponding to each group of messages, it is possible to return to execute the operation of determining the current message content to be reported based on the business data of the message associated with the first third sequence number in the first mapping table, until the determined message content is less than or equal to the threshold, call the preset message reporting interface, and send the determined message content, thereby effectively avoiding the omission or wrong sending of messages during the message sending process, and improving the reliability and accuracy of message sending.
[0053] In the disclosed embodiment, firstly, based on the business data of the message associated with the first sequence number to be reported, the content of the message to be reported is determined. When the content of the message is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure, and then the messages with declaration status of declaration failure in the first mapping table are regrouped to determine the third sequence number corresponding to each group of messages. Finally, based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message to be reported is returned until the determined message content is less than or equal to the threshold, and the determined message content is sent. Thus, when the content of the message associated with the first sequence number to be reported is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the mapping table is updated to declaration failure, and the message grouping is re-performed to determine the third sequence number corresponding to each group, and the operation of determining the content of the message to be reported is returned to execute, and when the content of the message is less than the threshold, the corresponding message content is sent. This effectively avoids the omission and wrong sending of messages during the message sending process, and improves the accuracy and reliability of message sending.
[0054] Figure 2 A flowchart of a message sending method provided in an embodiment of the present disclosure.
[0055] like Figure 2 As shown, the method includes:
[0056] Step 201, determining the first main message identifier and the first sub-message identifier corresponding to the first user in the current declaration period.
[0057] The declaration cycle may be pre-set, for example, monthly, etc., which is not limited in the present disclosure.
[0058] Among them, the main message identifier can be used to characterize the main message, and the sub-message identifier can be used to characterize the sub-message. The main message identifier and the sub-message identifier can both be identifiers of any form set in advance. For example, the main message identifier and the sub-message identifier can be the primary key value of the main message and the primary key value of the sub-message, respectively, and the present disclosure does not limit this.
[0059] In the present disclosure, when sending a message, in order to improve the reliability of message sending, the first main message identifier and the first sub-message identifier corresponding to the first user in the current reporting period can be determined first.
[0060] Step 202: Store the first main message identifier and the first sub-message identifier in the first mapping table in sequence.
[0061] In the present disclosure, after determining the first main message identifier and the first sub-message identifier corresponding to the first user in the current declaration period, the first main message identifier and the first sub-message identifier can be stored in the first mapping table in sequence, thereby providing conditions for improving the accuracy of message sending.
[0062] Step 203: based on the number of each group of messages corresponding to the second user who has completed the declaration, the message identifiers in the first mapping table are grouped and numbered in sequence to determine the sequence number corresponding to each group of messages.
[0063] In the present disclosure, after storing the first main message identifier and the first sub-message identifier in the first mapping table, in order to improve the success rate of message declaration, the message identifiers in the first mapping table can be grouped and numbered in sequence based on the number of each group of messages corresponding to the second user that has completed the declaration, so as to determine the serial number corresponding to each group of messages.
[0064] Step 204: When the first sequence number to be reported is greater than the maximum sequence number in the first mapping table, determine the reporting status of each message in the first mapping table.
[0065] In the present disclosure, after determining the sequence number corresponding to each group of messages in the first mapping table, when the first sequence number to be reported is greater than the maximum sequence number in the first mapping table, it can be determined that the first main message and the first sub-message of the first user in the first mapping table have been applied for. In order to determine whether the application of the first main message and the first sub-message is successful, the reporting status of each message in the first mapping table can be determined first.
[0066] Step 205, when the declaration status of each message in the first mapping table is successfully declared, delete the first main message identifier and the first sub-message identifier in the first mapping table, and update the declaration status in the first mapping table to the pending declaration status.
[0067] In the present disclosure, after determining the declaration status of each message in the first mapping table, when the declaration status of each message in the first mapping table is successful declaration, it can be determined that the first main message and the first sub-message of the first user have been successfully declared. At this time, the first main message identifier and the first sub-message identifier in the first mapping table can be deleted, and the declaration status in the first mapping table can be updated to the pending declaration status, thereby ensuring the accuracy and reliability of the message declaration.
[0068] It should be noted that after the declaration status in the first mapping table is updated to the pending declaration status, the main message identifier and sub-message identifier to be declared of the next user can be stored in the first mapping table to perform the message declaration of the user. This disclosure does not limit this.
[0069] In the disclosed embodiment, the first main message identifier and the first sub-message identifier corresponding to the first user in the current declaration period are first determined, and the first main message identifier and the first sub-message identifier are sequentially stored in the first mapping table. Then, based on the number of each group of messages corresponding to the second user that has completed the declaration, the message identifiers in the first mapping table are grouped and numbered in sequence to determine the sequence number corresponding to each group of messages. When the first sequence number to be declared is greater than the maximum sequence number in the first mapping table, the declaration status of each message in the first mapping table is determined. Finally, when the declaration status of each message in the first mapping table is a successful declaration, the first main message identifier and the first sub-message identifier in the first mapping table are deleted, and the declaration status in the first mapping table is updated to a pending declaration status. Therefore, after storing the main message identifier and sub-message identifier of the user in the current declaration cycle into the mapping table, the message identifiers in the mapping table are grouped and numbered based on the number of messages in each group corresponding to the users who have completed the declaration, and when the sequence number corresponding to the message to be declared is greater than the maximum sequence number and the declaration status of each message is successful, the main message identifier and sub-message identifier in the mapping table are deleted, and the declaration status in the mapping table is updated to the pending declaration status, thereby improving the reliability and accuracy of message sending.
[0070] Figure 3 A flowchart of a message sending method provided in an embodiment of the present disclosure.
[0071] like Figure 3 As shown, the method includes:
[0072] Step 301, based on the business data of the message associated with the first sequence number currently to be reported, determine the content of the message currently to be reported.
[0073] Step 302: When the message content is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure.
[0074] Step 303, regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number.
[0075] Step 304, based on the business data of the message associated with the first third serial number in the first mapping table, returns to perform the operation of determining the content of the message to be reported, and sends the determined message content when the determined message content is less than or equal to the threshold.
[0076] The specific implementation forms of steps 301 to 304 can refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.
[0077] Step 305, receiving the declaration receipt.
[0078] Among them, the declaration receipt can be a receipt used to indicate the result of the message declaration.
[0079] In the present disclosure, after sending a determined message content, in order to determine whether the message content is sent successfully and avoid missing or wrong sending of the message, a message declaration receipt can be received, thereby improving the reliability of the message declaration.
[0080] Step 306, when the declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the preset server to verify the determined message content.
[0081] In the present disclosure, after receiving the declaration receipt, if the declaration receipt indicates that the declaration failed, it can be determined that the message content has failed to be sent. At this time, the determined message content and the declaration failure indication information can be sent to the preset server to verify the determined message content, thereby improving the reliability of message sending.
[0082] It should be noted that the declaration failure indication information in the declaration receipt may indicate any declaration failure reason. For example, the declaration indication information may indicate that the currently determined message content size exceeds the size required by the specification, etc., and the present disclosure does not limit this.
[0083] It should be noted that when the reason for the failure of message content declaration is determined to be that the message content size exceeds the size required by the specification, subsequent messages associated with the message content will no longer be declared. At the same time, the message content that failed to be declared can be sent to relevant verification personnel for verification. This disclosure does not limit this.
[0084] Step 307: Update the declaration status of all messages in the first mapping table whose declaration status is pending declaration to declaration failure.
[0085] In the present disclosure, after the determined message content and the declaration failure indication information are sent to the preset server, the declaration status of all messages in the first mapping table whose declaration status is pending declaration can be updated to declaration failure, thereby improving the reliability of message declaration.
[0086] Optionally, after updating the declaration status of all messages with a declaration status of pending declaration in the first mapping table to declaration failure, an indication message may be sent to the server, wherein the indication message is used to indicate the suspension of declaration of the determined message content, so that the server may temporarily store the received message content, and when declaring the determined message content again, only the message content with a declaration status of "declaration failure" may be sent to the server, thereby effectively avoiding omissions and wrong transmissions during message declaration, and improving the reliability and efficiency of message transmission.
[0087] In the disclosed embodiment, first, based on the business data of the message associated with the first sequence number currently to be reported, the content of the message to be reported is determined. When the message content is greater than a threshold value, the reporting status of the messages associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to reporting failure. Then, the messages with reporting status of reporting failure in the first mapping table are regrouped, the third sequence number corresponding to each group of messages is determined, and based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message to be reported is returned to execute, until the determined message content is less than or equal to the threshold value, the determined message content is sent, and then a reporting receipt is received. When the reporting receipt indicates that the reporting has failed, the determined message content and the reporting failure indication information are sent to the preset server to verify the determined message content. Finally, the reporting status of all messages with reporting status to be reported in the first mapping table is updated to reporting failure. Therefore, after sending the determined message content, if the received declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information will be sent to the server to verify the internal statistics, and the declaration status of the message with the declaration status to be declared in the mapping table will be updated to declaration failure, thereby improving the reliability and accuracy of message sending.
[0088] Figure 4 A flowchart of a message sending method provided in an embodiment of the present disclosure.
[0089] like Figure 4 As shown, the method includes:
[0090] Step 401, based on the business data of the message associated with the first sequence number currently to be reported, determine the content of the message currently to be reported.
[0091] Step 402, when the message content is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure.
[0092] Step 403, regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number.
[0093] Step 404, based on the business data of the message associated with the first third serial number in the first mapping table, returns to perform the operation of determining the content of the message to be reported, and sends the determined message content when the determined message content is less than or equal to the threshold.
[0094] Step 405, receiving the declaration receipt.
[0095] Step 406, when the declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the preset server to verify the determined message content.
[0096] Step 407: Update the declaration status of all messages in the first mapping table whose declaration status is pending declaration to declaration failure.
[0097] The specific implementation forms of steps 401 to 407 may refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.
[0098] Step 408: upon receiving the message content update instruction returned by the preset server, obtaining the updated message content.
[0099] In the present disclosure, after the determined message content and declaration failure indication information are sent to the server, upon receiving the message content update instruction returned by the server, the message content can be updated and the updated message content can be obtained, thereby improving the success rate of message declaration.
[0100] It should be noted that when updating the message content, the message content may be updated by regrouping the message content and reducing the number of messages in each group, which is not limited in the present disclosure.
[0101] Step 409, when it is determined that there is no other message content being sent, the updated message content is sent, and the declaration status of all messages in the first mapping table whose declaration status is declaration failure is updated to pending declaration.
[0102] In the present disclosure, after obtaining the updated message content, if it is determined that there is no other message content being sent at present, the updated message content can be sent, and the declaration status of all messages in the first mapping table whose declaration status is failed declaration can be updated to pending declaration, thereby improving the accuracy and success rate of message sending.
[0103] In the disclosed embodiment, firstly, based on the business data of the message associated with the first sequence number to be reported, the content of the message to be reported is determined. When the content of the message is greater than a threshold value, the reporting status of the messages associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to reporting failure. Then, the messages with reporting status of reporting failure in the first mapping table are regrouped to determine the third sequence number corresponding to each group of messages. Based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message to be reported is returned until the determined message content is less than or equal to the threshold value. Under the condition that the determined message content is sent, and then a declaration receipt is received, when the declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the preset server to verify the determined message content, and the declaration status of all messages with a declaration status of pending declaration in the first mapping table is updated to declaration failure, and when the message content update instruction is received from the preset server, the updated message content is obtained, and finally, when it is determined that there is no other message content being sent at present, the updated message content is sent, and the declaration status of all messages with a declaration status of failed declaration in the first mapping table is updated to pending declaration. Therefore, after sending the determined message content, when the received declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the server, and the declaration status of the message with a declaration status of pending declaration in the mapping table is updated to declaration failure, and when the message content update instruction returned by the server is received, the message content is updated, and when there is no other message content being sent at present, the updated message content is sent, and the declaration status of the message with a declaration status of failed declaration in the mapping table is updated to pending declaration, thereby improving the success rate and reliability of message sending.
[0104] Figure 5 A flowchart of a message sending method provided in an embodiment of the present disclosure.
[0105] like Figure 5 As shown, the method includes:
[0106] Step 501, based on the business data of the message associated with the first sequence number currently to be reported, determine the content of the message currently to be reported.
[0107] Step 502: When the message content is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure.
[0108] Step 503, regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number.
[0109] Step 504, based on the business data of the message associated with the first third sequence number in the first mapping table, returns to perform the operation of determining the content of the message to be reported, and sends the determined message content when the determined message content is less than or equal to the threshold.
[0110] Step 505, receiving the declaration receipt.
[0111] Step 506, when the declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the preset server to verify the determined message content.
[0112] Step 507: Update the declaration status of all messages in the first mapping table whose declaration status is pending declaration to declaration failure.
[0113] The specific implementation forms of steps 501 to 507 can refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.
[0114] Step 508, determining the second main message identifier and the second sub-message identifier corresponding to the third user in the current declaration period.
[0115] In the present disclosure, after the declaration status of all messages with a pending declaration status in the first mapping table is updated to declaration failure, if there is a third user with a pending declaration message within the current declaration cycle, the second main message identifier and the second sub-message identifier corresponding to the third user within the current declaration cycle can be first determined, thereby providing conditions for declaring the message of the third user.
[0116] Step 509: Generate a second mapping table based on the second main message identifier and the second sub-message identifier.
[0117] In the present disclosure, after determining the second main message and second sub-message identifier corresponding to the third user, since there are undeclared message identifiers in the first mapping table, in order to avoid message sending confusion, and the message identifiers in the subsequent first mapping table may continue to be declared, at this time, a second mapping table can be generated based on the second main message identifier and the second sub-message identifier, thereby improving the efficiency and accuracy of message declaration.
[0118] Step 510: based on the number of each group of messages corresponding to the first user, group and number the message identifiers in the second mapping table in sequence to determine the sequence number corresponding to each group of messages.
[0119] In the present disclosure, after generating the second mapping table, in order to improve the success rate of sending the second main message and the second sub-message of the third user, the message identifiers in the second mapping table can be grouped and numbered in sequence based on the number of messages in each group corresponding to the first user to determine the sequence number corresponding to each group of messages.
[0120] It should be noted that when the message identifiers in the second mapping table are grouped and numbered in sequence based on the number of messages in each group corresponding to the first user, the number of messages contained in each group in the second mapping table may be less than or equal to the number of messages in each group corresponding to the first user, and the present disclosure does not limit this.
[0121] Step 511, based on the order of the group numbers in the second mapping table from small to large, send the message content corresponding to each group number in sequence.
[0122] In the present disclosure, after determining the sequence number corresponding to each group of messages in the second mapping table, the message content corresponding to each group number can be sent in sequence based on the order of the group numbers in the second mapping table from small to large, thereby effectively avoiding omissions and wrong transmissions during message transmission and improving the reliability of message transmission.
[0123] In the disclosed embodiment, first, based on the business data of the message associated with the first sequence number currently to be reported, the content of the message currently to be reported is determined. When the message content is greater than a threshold value, the reporting status of the messages associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to reporting failure. Then, the messages with reporting status of reporting failure in the first mapping table are regrouped, the third sequence number corresponding to each group of messages is determined, and based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message currently to be reported is returned until the determined message content is less than or equal to the threshold value, and the determined message content is sent. Receive a declaration receipt, and if the declaration receipt indicates a declaration failure, send the determined message content and declaration failure indication information to the preset server to verify the determined message content, and update the declaration status of all messages with a declaration status of pending declaration in the first mapping table to declaration failure, then determine the second main message identifier and the second sub-message identifier corresponding to the third user in the current declaration period, and generate a second mapping table based on the second main message identifier and the second sub-message identifier, and finally, based on the number of messages in each group corresponding to the first user, group and number the message identifiers in the second mapping table in sequence, determine the sequence number corresponding to each group of messages, and send the message content corresponding to each group number in sequence based on the order of the group numbers in the second mapping table from small to large. Therefore, after sending the determined message content in the first mapping table, when the received declaration receipt indicates that the declaration failed, the determined message content and the declaration failure indication information are sent to the server, and the declaration status of all messages to be declared in the first mapping table is updated to declaration failure. Then, the main message identifier and sub-message identifier of other users in the current declaration period are determined, and a second mapping table is generated. Based on the number of messages in each group of the first user corresponding to each message in the first mapping table, each message identifier in the second mapping table is grouped and numbered, and the message content corresponding to each group number is sent in sequence, thereby effectively avoiding omissions and wrong transmissions when sending messages, and improving the efficiency and reliability of message transmission.
[0124] In order to implement the above embodiment, the embodiment of the present disclosure also proposes a message sending device.
[0125] Figure 6 A schematic diagram of the structure of a message sending device provided in an embodiment of the present disclosure.
[0126] like Figure 6 As shown, the message sending device 600 may include:
[0127] A first determination module 601 is used to determine the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported;
[0128] An updating module 602 is used to update the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table to declaration failure when the message content is greater than the threshold;
[0129] The second determination module 603 is used to regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number;
[0130] Processing module 604 is used to return to execute the operation of determining the content of the current message to be reported based on the business data of the message associated with the first third sequence number in the first mapping table, and send the determined message content when the determined message content is less than or equal to the threshold.
[0131] Optionally, the first determining module 601 is specifically configured to:
[0132] When the first sequence number is less than or equal to the maximum sequence number in the first mapping table, the content of the message to be reported is determined based on the business data of the message associated with the first sequence number.
[0133] Optionally, it also includes:
[0134] A third determination module (not shown in the figure), used to determine the first main message identifier and the first sub-message identifier corresponding to the first user in the current declaration period;
[0135] A storage module (not shown in the figure), used to store the first main message identifier and the first sub-message identifier in the first mapping table in sequence;
[0136] The grouping module (not shown in the figure) is used to group and number the message identifiers in the first mapping table in sequence based on the number of each group of messages corresponding to the second user who has completed the declaration, and determine the sequence number corresponding to each group of messages.
[0137] Optionally, it also includes:
[0138] A fourth determination module (not shown in the figure) is used to determine the declaration status of each message in the first mapping table when the first sequence number to be declared is greater than the maximum sequence number in the first mapping table;
[0139] The update module (not shown in the figure) is used to delete the first main message identifier and the first sub-message identifier in the first mapping table when the declaration status of each message in the first mapping table is successfully declared, and update the declaration status in the first mapping table to the pending declaration status.
[0140] Optionally, the processing module 604 is further configured to:
[0141] Receive declaration receipt;
[0142] In the case where the declaration receipt indicates that the declaration has failed, the determined message content and the declaration failure indication information are sent to the preset server to verify the determined message content;
[0143] The declaration status of all messages in the first mapping table whose declaration status is pending declaration is updated to declaration failure.
[0144] Optionally, the processing module 604 is further configured to:
[0145] Send an indication message, wherein the indication message is used to indicate to suspend the reporting of the determined message content.
[0146] Optionally, the processing module 604 is further configured to:
[0147] Upon receiving a message content update instruction returned by a preset server, obtaining updated message content;
[0148] When it is determined that there is no other message content being sent, the updated message content is sent, and the declaration status of all messages in the first mapping table whose declaration status is declaration failure is updated to pending declaration.
[0149] Optionally, the processing module 604 is further configured to:
[0150] Determine the second main message identifier and the second sub-message identifier corresponding to the third user in the current declaration period;
[0151] Generate a second mapping table based on the second main message identifier and the second sub-message identifier;
[0152] Based on the number of each group of messages corresponding to the first user, group and number the message identifiers in the second mapping table in sequence to determine the sequence number corresponding to each group of messages;
[0153] Based on the order of the group numbers in the second mapping table from small to large, the message content corresponding to each group number is sent in sequence.
[0154] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.
[0155] In the present disclosure, firstly, based on the business data of the message associated with the first sequence number to be reported, the content of the message to be reported is determined. When the content of the message is greater than the threshold, the reporting status of the messages associated with the first sequence number and the second sequence numbers after the first sequence number in the first mapping table is updated to reporting failure, and then the messages with reporting failure status in the first mapping table are regrouped to determine the third sequence number corresponding to each group of messages. Finally, based on the business data of the message associated with the first third sequence number in the first mapping table, the operation of determining the content of the message to be reported is returned until the determined message content is less than or equal to the threshold, and the determined message content is sent. Thus, when the content of the message associated with the first sequence number to be reported is greater than the threshold, the reporting status of the messages associated with the first sequence number and the second sequence numbers after the first sequence number in the mapping table is updated to reporting failure, and the messages are regrouped to determine the third sequence number corresponding to each group, and the operation of determining the content of the message to be reported is returned to execute, and when the content of the message is less than the threshold, the corresponding message content is sent. This effectively avoids the omission and wrong sending of messages during the message sending process, and improves the accuracy and reliability of message sending.
[0156] Figure 7 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown.
[0157] Figure 7 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0158] like Figure 7 As shown, the electronic device 12 is in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, memory 28, and a bus 18 connecting different system components (including memory 28 and processing unit 16). The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure in a variety of bus structures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (hereinafter referred to as: ISA) bus, a Micro Channel Architecture (hereinafter referred to as: MCA) bus, an Enhanced ISA bus, a Video Electronics Standards Association (hereinafter referred to as: VESA) local bus, and a Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
[0159] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0160] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, often called a "hard drive").
[0161] although Figure 7 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only 15 (Digital Video Disc Read Only Memory; hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive can be connected to the bus 18 through one or more data medium interfaces. The memory 28 may include at least one program product having a set (for example, at least one) of program modules, which are configured to perform the functions of the various embodiments of the present disclosure.
[0162] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0163] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable the human body to interact with the electronic device 12, and / or communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the electronic device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0164] The processing unit 16 executes various functional applications and parameter information determination by running the program stored in the memory 28, such as implementing the message sending method mentioned in the above embodiment.
[0165] In order to implement the above embodiments, the present disclosure further proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the message sending method proposed in the above embodiments of the present disclosure is implemented.
[0166] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product executes, the message sending method proposed in the above embodiments of the present disclosure is executed.
[0167] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0168] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0169] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.
[0170] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0171] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0172] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0173] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0174] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0175] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0176] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. A message sending method, characterized in that: include: Determine the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported; When the content of the message is greater than the threshold, the declaration status of the message associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table is updated to declaration failure; Regrouping the messages whose declaration status is declaration failure in the first mapping table, and determining the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number; Based on the business data of the message associated with the first third serial number in the first mapping table, return to execute the operation of determining the content of the message currently to be declared, and send the determined message content when the determined message content is less than or equal to the threshold.
2. The method according to claim 1, characterized in that The determining the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported currently includes: When the first sequence number is less than or equal to the maximum sequence number in the first mapping table, the content of the message to be reported is determined based on the business data of the message associated with the first sequence number.
3. The method according to claim 1, characterized in that The method further comprises: Determine the first main message identifier and the first sub-message identifier corresponding to the first user in the current declaration period; storing the first main message identifier and the first sub-message identifier in the first mapping table in sequence; Based on the number of each group of messages corresponding to the second user who has completed the declaration, the message identifiers in the first mapping table are grouped and numbered in sequence to determine the sequence number corresponding to each group of messages.
4. The method according to claim 3, characterized in that The method further comprises: In a case where the first sequence number currently to be reported is greater than the maximum sequence number in the first mapping table, determining a reporting status of each message in the first mapping table; When the declaration status of each message in the first mapping table is successful, the first main message identifier and the first sub-message identifier in the first mapping table are deleted, and the declaration status in the first mapping table is updated to a pending declaration status.
5. The method according to any one of claims 1 to 4, characterized in that: After sending the determined message content, the method further includes: Receive declaration receipt; In the case where the declaration receipt indicates that the declaration has failed, sending the determined message content and the declaration failure indication information to a preset server to verify the determined message content; The declaration status of all messages in the first mapping table whose declaration status is pending declaration is updated to declaration failure.
6. The method according to claim 5, characterized in that After updating the declaration status of all messages in the first mapping table whose declaration status is to be declared to declaration failure, the method further includes: Sending indication information, wherein the indication information is used to instruct the suspension of reporting of the determined message content.
7. The method according to claim 5, characterized in that After updating the declaration status of all messages in the first mapping table whose declaration status is to be declared to declaration failure, the method further includes: Upon receiving the message content update instruction returned by the preset server, obtaining the updated message content; When it is determined that there is no other message content being sent at present, the updated message content is sent, and the declaration status of all messages in the first mapping table whose declaration status is declaration failure is updated to pending declaration.
8. The method according to claim 5, characterized in that After updating the declaration status of all messages in the first mapping table whose declaration status is to be declared to declaration failure, the method further includes: Determine the second main message identifier and the second sub-message identifier corresponding to the third user in the current declaration period; Generate a second mapping table based on the second main message identifier and the second sub-message identifier; Based on the number of each group of messages corresponding to the first user, group and number the message identifiers in the second mapping table in sequence to determine the sequence number corresponding to each group of messages; Based on the order of the group numbers in the second mapping table from small to large, the message content corresponding to each group number is sent in sequence.
9. A message sending device, characterized in that: include: A first determination module, used to determine the content of the message to be reported based on the business data of the message associated with the first sequence number to be reported; An updating module, configured to update the declaration status of the messages respectively associated with the first sequence number and each second sequence number after the first sequence number in the first mapping table to declaration failure when the content of the message is greater than a threshold value; A second determination module is used to regroup the messages whose declaration status is declaration failure in the first mapping table, and determine the third sequence number corresponding to each group of messages, wherein the number of messages associated with the third sequence number is less than the number of messages associated with the first sequence number; A processing module is used to return to execute the operation of determining the content of the message to be reported currently based on the business data of the message associated with the first third serial number in the first mapping table, and send the determined message content when the determined message content is less than or equal to a threshold.
10. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that may be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for adjusting group size
CN105939282A
Message playback method and device, electronic equipment and computer readable medium
CN114124555A
Warehousing data transmission method based on Beidou short message
CN116684923A
Data packet processing method and device and related equipment
CN117499990A
Delaration information updating method and device, computer equipment and storage medium
CN118114099A