Data processing method, apparatus and electronic device
By classifying data packets according to the relationship between enterprise accounts and gateways and sending them directly in the unified communications platform, the problem of slow information transmission speed is solved, and faster information transmission is achieved.
Patent Information
- Application Number
- CN202211549084.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-12-05
AI Technical Summary
In a unified communication platform, when using routing technology, the disordered stacking of information to be sent in the queue leads to slow information transmission speed and delays in the transmission of information by each gateway.
By acquiring data packets in real time, determining gateway information based on the correspondence between the enterprise's account and the gateway, classifying the data packets and writing them into the corresponding queues, and sending them directly to the gateway, the data packets are prevented from piling up in the queue to be sent.
It improves the speed of information transmission, reduces the transmission time of data packets from the queue to the gateway, and improves the efficiency of information transmission.
Smart Images

Figure CN115987909B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data identification, and in particular to a data processing method, apparatus and electronic device. Background Technology
[0002] Currently, with the development of unified communications platforms, the business of sending messages to customers is gradually shifting to unified communications platforms. Generally, after receiving a request from a company, the unified communications platform will send corresponding information to the company's target users, who are the customers to whom the information is to be sent. The request information includes at least the target users' phone numbers and the request content.
[0003] In related technologies, the message sending services of a unified communication platform to users often employ routing technology. Information to be sent is written into a queue for storage, and then retrieved sequentially from the queue and sent to its corresponding gateway. The queue contains all information to be sent within the unified communication platform. However, when using routing technology, the unordered storage of information in the queue leads to a long time before information is placed into the appropriate gateway, causing delays in the gateway's transmission and ultimately slowing down the unified communication platform's message sending speed.
[0004] Therefore, how to provide a solution to the above-mentioned technical problems is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] To improve the efficiency of information transmission, this application provides a data processing method, apparatus, and electronic device.
[0006] Firstly, this application provides a data processing method, which adopts the following technical solution:
[0007] A data processing method, comprising:
[0008] Multiple data packets are acquired in real time. Each data packet includes at least the user's phone number, the message to be sent, and the company's account. The message to be sent is the specific information that the company is sending to the user.
[0009] Based on the enterprise account of each data packet, the gateway information of each data packet is determined by using the correspondence between the enterprise account and the gateway; and based on the gateway information, the number of data packets corresponding to each gateway is determined.
[0010] For each data packet in each gateway, the queue corresponding to the data packet is determined from the correspondence between queues and enterprise accounts, and the data packet is written into the corresponding queue. Each queue corresponds to a unique enterprise account.
[0011] The data packets in each queue are sent to the gateway, and the gateway is used to send the corresponding data packets to the terminal device corresponding to the user's phone number.
[0012] By adopting the above technical solution, compared to related technologies that pile up several data packets in a queue to be sent and then send the reply information in the queue to the gateway corresponding to each reply information, this solution classifies several data packets according to the gateway information in the data packets, and further classifies several data packets of the same gateway according to the enterprise account in the data packets. This allows data packets to be sent directly from the queue to the gateway corresponding to the enterprise account in the queue, avoiding the problem of slow data packet transmission speed due to data packets piling up in the queue. This solution can improve the speed of sending information.
[0013] In a preferred example, this application can be further configured as follows:
[0014] Sending data packets from each queue to the gateway includes:
[0015] Obtain the extraction speed corresponding to each gateway, where the extraction speed represents the number of data packets sent to the gateway per unit time;
[0016] Based on the extraction speed of each gateway, determine the number of data packets corresponding to the specified quantity from all queues corresponding to the gateway; and send the number of data packets corresponding to the specified quantity to the gateway.
[0017] By adopting the above technical solution, after obtaining the extraction speed corresponding to each gateway, based on the extraction speed of each gateway, a number of data packets corresponding to the specified quantity are determined from all queues corresponding to the gateway; and these multiple data packets are then sent to the gateway. The pre-set extraction speed for each gateway avoids over- or under-allocating tasks to each gateway, improving the smoothness of data packet transmission while ensuring that each gateway is not idle. The task quantity refers to the target number of data packets sent by each gateway per unit time.
[0018] In a preferred example, this application can be further configured as follows:
[0019] Before retrieving multiple data packets, the following is also included:
[0020] Obtain request information from several companies, where the request information includes at least the company's account information;
[0021] Based on the request information from each enterprise, obtain the enterprise information of each enterprise, wherein the enterprise information includes at least authentication information;
[0022] For each authentication information, based on the in-memory database, it is determined whether there is any identity information corresponding to the authentication information. The in-memory database includes at least multiple identity information, and each identity information includes the pre-set authentication information of each enterprise.
[0023] If not, a first relevant prompt indicating authentication failure will be sent to the enterprise. The first relevant prompt is a prompt indicating that the system has determined that the enterprise's authentication information is incorrect.
[0024] If so, the enterprise authentication is confirmed to be successful, and based on the information of all successfully authenticated enterprises and their corresponding request information, multiple data packets corresponding to each successfully authenticated enterprise are obtained.
[0025] By adopting the above technical solution and using an in-memory database to determine whether any identity information corresponds to the authentication information, it is possible to better handle high concurrency of request information and avoid a large backlog of request information during the identity authentication process, which would result in enterprises receiving too many first-related prompts and leading to a poor user experience of the unified communication platform.
[0026] In a preferred example, this application can be further configured as follows:
[0027] Based on the information of all successfully authenticated enterprises and their corresponding request information, obtain multiple data packets corresponding to each successfully authenticated enterprise, including:
[0028] Based on the information of all successfully authenticated enterprises and their corresponding request information, obtain the user phone numbers corresponding to each of the successfully authenticated enterprises. The request information includes at least the user phone number and the information to be sent.
[0029] Based on the preset user blacklist in the memory database, the blacklist users in the user phone numbers corresponding to each of the successfully authenticated enterprise information are filtered out, and a number of non-blacklisted user phone numbers corresponding to each of the successfully authenticated enterprise information are obtained.
[0030] Based on multiple preset sensitive words in the memory database, the system filters the information to be sent for each of the non-blacklisted user phone numbers and obtains the information to be sent for each of the filtered non-blacklisted user phone numbers.
[0031] Each data packet is determined based on each filtered message to be sent and the corresponding user's phone number and the company's account.
[0032] By adopting the above technical solution, invalid information is filtered out, thus avoiding the waste of time in processing invalid information. This achieves a data processing process of filtering invalid information first and then processing valid information, avoiding resource waste. Invalid information refers to information to be sent that corresponds to blacklisted users and / or contains any preset sensitive words, while valid information refers to information to be sent that does not correspond to blacklisted users and / or contains any preset sensitive words.
[0033] In a preferred example, this application can be further configured as follows:
[0034] Before determining, based on the in-memory database, whether any identity information corresponding to the authentication information exists for each piece of authentication information, the process also includes:
[0035] For each enterprise's account, based on all the preset enterprise accounts in the in-memory database, determine whether there is any preset enterprise account that is the same as the enterprise's account. The in-memory database includes at least a number of pre-stored authentication information corresponding to multiple enterprises, and each authentication information includes at least the enterprise's account.
[0036] If it does not exist, a second relevant prompt will be sent to the enterprise. The second relevant prompt is a prompt that the system cannot find the relevant information for the current enterprise.
[0037] If it exists, then perform the step of determining, based on the in-memory database, whether any identity information corresponding to the authentication information exists for each authentication information.
[0038] By adopting the above technical solution, and by using each enterprise's account and all the pre-stored enterprise accounts in the memory database, it is determined whether the pre-stored enterprise account with the same account as the enterprise is stored in the memory database. This determines whether the corresponding identity information of the enterprise cannot be obtained or whether the verification has failed. The reasons for the enterprise authentication failure are further refined, and the corresponding error type is fed back to the enterprise that failed the authentication, thereby further improving the efficiency for enterprises to successfully authenticate.
[0039] In a preferred example, this application can be further configured as follows:
[0040] Data processing methods also include:
[0041] Get the number of messages to be sent successfully by each gateway per unit time.
[0042] Determine whether the difference between the number of messages successfully sent by each gateway per unit time and the preset number of messages successfully sent by each gateway per unit time is less than a set threshold.
[0043] If it is not less than, then the load ratio of all gateways is updated according to the number of messages to be sent successfully by each gateway per unit time. The load ratio is used to determine the extraction speed of each gateway.
[0044] or,
[0045] Get the remaining number of data packets in all queues corresponding to each gateway;
[0046] Determine whether the remaining quantity of each gateway is within a preset threshold range; if not, update the extraction speed based on the remaining quantity of each gateway and the preset threshold range.
[0047] By adopting the above technical solution, the load ratio of all gateways is adjusted in real time according to the number of messages successfully sent by each gateway per unit time, so as to improve the success rate of the unified communication platform in sending messages.
[0048] In a preferred example, this application can be further configured as follows:
[0049] Obtain request information from several companies, including:
[0050] Obtain initial request information from several companies;
[0051] For each initial request information, if the protocol type of the initial request information is different from the standard processable protocol type, the initial request information is converted to obtain request information; if the protocol type of the initial request information is the same as the standard processable protocol type, the initial request information is determined to be request information.
[0052] By adopting the above technical solution, initial request information of multiple protocols can be processed simultaneously, eliminating the need for enterprises to convert information into protocol types that electronic devices can process.
[0053] In a preferred example, this application can be further configured as follows:
[0054] Data processing methods also include:
[0055] Retrieve log records from the relational database, wherein the log records include all relevant records of data changes in the data processing method.
[0056] By adopting the above technical solution, a relational database with physical storage can store a large amount of log records, thus ensuring the storage space for log records.
[0057] Secondly, this application provides a data processing apparatus, which adopts the following technical solution:
[0058] The data packet acquisition module is used to acquire multiple data packets in real time. Each data packet includes at least the user's phone number, the message to be sent, and the company's account. The message to be sent is the specific information that the company is sending to the user.
[0059] The gateway information assignment module is used to determine the gateway information for each data packet based on the enterprise's account and the correspondence between the enterprise account and the gateway; and to determine the number of data packets corresponding to each gateway based on the gateway information.
[0060] The queuing module is used to determine the queue corresponding to each data packet in each gateway from the correspondence between queues and enterprise accounts, and write the data packet into the corresponding queue. Each queue corresponds to a unique enterprise account.
[0061] The gateway sending module is used to send the data packets in each queue to the gateway, and then use the gateway to send the corresponding data packets to the terminal device corresponding to the user's phone number.
[0062] Thirdly, this application provides an electronic device that adopts the following technical solution:
[0063] At least one processor;
[0064] Memory;
[0065] At least one application, wherein the at least one application is stored in memory and configured to be executed by at least one processor, the at least one application being configured to: perform the method described in any one of 1 to 8 above.
[0066] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:
[0067] A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in any one of 1 to 8 above.
[0068] In summary, this application includes at least one of the following beneficial technical effects:
[0069] 1. Compared to related technologies that pile up data packets in a queue and then send the response information in the queue to the gateway corresponding to each response, this solution classifies data packets based on the gateway information in the data packets, and further classifies data packets from the same gateway into queues based on the enterprise account in the data packets. This allows data packets to be sent directly from the queue to the gateway corresponding to the enterprise account in the queue, avoiding the problem of slow data packet delivery to their respective gateways due to data packet accumulation in the queue. This solution can improve the speed of sending information.
[0070] 2. Utilizing an in-memory database to determine the existence of any identity information corresponding to the authentication information can better handle high concurrency of request information, avoid a large backlog of request information during the identity authentication process, and prevent enterprises from receiving too many first-related prompts, resulting in a poor user experience of the unified communication platform. Attached Figure Description
[0071] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application.
[0072] Figure 2 This is a flowchart illustrating a gateway information confirmation method provided in an embodiment of this application.
[0073] Figure 3 This is a schematic diagram of the structure of a data processing device provided in the embodiments of this application.
[0074] Figure 4 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this application. Detailed Implementation
[0075] The present application will be further described in detail below with reference to the accompanying drawings.
[0076] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of this application.
[0077] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application are described clearly and completely. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0078] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0079] Generally, a unified communications platform integrates all information types, such as voice, fax, email, SMS, multimedia, and data, to provide people with freedom of choice and improved efficiency. However, when processing various data on a unified communications platform, especially when enterprises use it to send messages to customers within their customer base, routing technology is often used to send all the information to be sent to their respective gateways.
[0080] However, when using routing technology, the information to be sent is piled up in the queue in an unordered manner, which results in a long time for the information to be sent to the corresponding gateway. This causes the unified communication platform to experience long processing times when sending information from one enterprise to another’s customers.
[0081] Therefore, the inventors discovered that multiple data packets can be acquired in real time, each data packet including at least the user's phone number, the message to be sent, and the company's account. The message to be sent is the specific information sent by the corresponding company to the user. Based on the company's account in each data packet, the gateway information for each data packet is determined using the mapping between the company account and the gateway. Based on the gateway information, several data packets are determined for each gateway. For each data packet in each gateway, the corresponding queue is determined from the mapping between queues and company accounts, and the data packet is written into the corresponding queue. Each queue corresponds to a unique company account. The data packets in each queue are sent to the gateway, and the gateway then sends the corresponding data packets to the terminal device corresponding to the user's phone number. This solves the problem of slow information transmission speed in unified communication platforms.
[0082] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0083] This application provides a data processing method executed by an electronic device, which can be a server or a terminal device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smartphone, tablet, laptop, desktop computer, etc., but is not limited to these. The terminal device and the server can be directly or indirectly connected via wired or wireless communication. This application does not impose any limitations on this connection. Figure 1As shown, the method includes steps S101, S102, S103, and S104, wherein:
[0084] Step S101: Acquire multiple data packets in real time.
[0085] The unified communication platform on the electronic device acquires request information from the enterprise in real time and then generates multiple data packets based on the request information. The request information may be from one enterprise or from multiple enterprises. When there is only one enterprise, the multiple data packets can correspond to the same enterprise. Each data packet includes at least the user's phone number, the message to be sent, and the enterprise's account. The message to be sent is the specific information sent by the enterprise to the user based on the request information. When there is more than one enterprise, the multiple data packets can correspond to multiple enterprises.
[0086] Furthermore, during the processing of data packets in the unified communication platform, the data packets can be encrypted at each step of the output process, and correspondingly, decrypted at each step of the output process to ensure information security during network communication. The encryption and decryption methods are not limited in this embodiment.
[0087] Step S102: Based on the enterprise account of each data packet, determine the gateway information of each data packet by using the correspondence between the enterprise account and the gateway; and determine the number of data packets corresponding to each gateway based on the gateway information.
[0088] Specifically, such as Figure 2 As shown, determining the gateway information for each data packet based on the enterprise's account and the mapping between the enterprise account and the gateway may include steps S1021 to S1024, wherein:
[0089] Step S1021: For each enterprise, based on the enterprise's account and the correspondence between enterprise accounts and gateways in the database, obtain the gateway load information corresponding to the enterprise, and determine whether the gateway load information of the enterprise includes only one gateway. Each gateway load information includes at least several gateways corresponding to each enterprise and the load ratio of the gateways.
[0090] Step S1022: Divide several enterprises that only include one gateway into a single load enterprise group, and divide several enterprises that include multiple gateways into a multi-load enterprise group, wherein each of the single load enterprise group and the multi-load enterprise group includes several enterprises.
[0091] Step S1023: For a single-load enterprise group, based on the phone numbers of the users corresponding to the multiple data packets of each enterprise, and the correspondence between phone numbers and gateway information in the database, determine the gateway information for each data packet. The correspondence between phone numbers and gateway information can be jointly determined by the correspondence between phone numbers and operators, and the correspondence between operators and gateway information.
[0092] For example, if a user's phone number corresponds to operator A in multiple data packets for a certain enterprise, then if the enterprise is in a single-load enterprise group, the gateway information of the gateway corresponding to operator A will be used as the gateway information of the data packet corresponding to the user's phone number.
[0093] Step S1024: For each enterprise in the multi-load enterprise group, determine the gateway information for all data packets corresponding to the enterprise. Each gateway information may include first gateway information or second gateway information.
[0094] The first gateway information is gateway parameter information with a nationwide attribute, and the gateway corresponding to the first gateway information can support the unified communication platform to send messages to user terminals across the country; the second gateway information indicates that when an enterprise sends information to a specific province, the gateway corresponding to the second gateway information can support the unified communication platform to send messages to user terminals in that specific province, and the second gateway information corresponds one-to-one with the enterprise, and the specific province can be set by the enterprise according to its needs.
[0095] Furthermore, the order of steps S1023 and S1024 is not specifically limited in this embodiment; it is sufficient to determine the gateway information of each data packet corresponding to each enterprise in the multi-load enterprise group and the single-load enterprise group.
[0096] Specifically, step S1024, when determining gateway information for each of the multiple data packets corresponding to each enterprise in the multi-load enterprise group, may include steps S1024-1 to S1024-4 (not shown in the attached figures), wherein:
[0097] Step S1024-1: For each enterprise in the multi-load enterprise group, obtain the load ratio of the gateway of each enterprise. The load ratio of the gateway of an enterprise can be determined according to the maximum data packet capacity of the gateway of the enterprise and the performance and stability of the gateway itself. Based on the load ratio of the gateway, determine the first gateway information as the gateway information of each data packet. The first gateway information may include several gateway information.
[0098] For example, the first gateway information includes gateways A, B, and C. The load ratio of the corresponding first gateway information for enterprise α is 1:3:6, and enterprise α currently has N data packets. In this case, 0.1N data packets are assigned to the gateway information corresponding to gateway A, 0.3N data packets are assigned to the gateway information corresponding to gateway B, and 0.6N data packets are assigned to the gateway information corresponding to gateway C. Specifically, the division of 0.1N, 0.3N, and 0.6N can be based on conditions or randomized; this embodiment of the application does not specifically limit this.
[0099] Step S1024-2: Determine whether there are specific provincial network conditions in the gateway load information corresponding to each enterprise.
[0100] Among them, the specific provincial network sending conditions corresponding to an enterprise can exist or not exist. If the specific provincial network sending conditions exist, it means that the enterprise can determine all data packets corresponding to each gateway according to the load ratio. In addition, the gateway load information corresponding to each enterprise includes at least the first gateway information or the second gateway information.
[0101] Step S1024-3: If it exists, replace the gateway information of each data packet corresponding to each enterprise that includes specific provincial network sending conditions with the second gateway information from the first gateway information; and determine the gateway information of each data packet corresponding to each enterprise that does not have specific provincial network conditions as the new gateway information in the final data packet, so as to determine the gateway information of each enterprise in the multi-load enterprise group.
[0102] Step S1024-4: If it does not exist, then take the first gateway information in the gateway information corresponding to all data packets of each enterprise in the multi-load enterprise group as the final gateway information in each data packet.
[0103] As can be seen from the above embodiments, for the same enterprise, according to steps S1024-1 to S1024-4, each data packet is first assigned the first gateway information corresponding to the enterprise, and then it is determined whether the enterprise has specific provincial network conditions. If so, the first gateway information in all data packets corresponding to the enterprise with specific provincial network conditions is replaced with the second gateway information. Instead of grouping enterprises based on whether they have specific provincial network conditions, and then assigning gateway information to all data packets corresponding to enterprises with and without specific provincial network conditions respectively, the grouping time is saved, which can improve the time for determining gateway information for all data packets in a multi-load enterprise group to a certain extent.
[0104] Furthermore, after determining the gateway information corresponding to each data packet according to steps S1021 to S1024, the multiple data packets acquired in real time can be grouped by each gateway based on the gateway information in each data packet.
[0105] It is understood that in this embodiment, considering that the gateway information pre-stored by each enterprise in the unified communication platform may include one or more gateways, and that when the pre-stored gateway information includes multiple gateways, the method of determining the gateway information for each data packet in the enterprise differs depending on the load ratio compared to when only one gateway is included, steps S1021 to S1024 show that this embodiment provides a method of first distinguishing several enterprises corresponding to one or more gateways, and then determining the gateway information for all data packets corresponding to each of the multi-load enterprise group and the single-load enterprise group, ensuring the accuracy of determining the gateway information for each data packet. Furthermore, to reduce the time spent sending data packets from the queue to the gateway corresponding to each data packet, it is possible to group all data packets by different gateways after obtaining the data packets with gateway information.
[0106] Step S103: For each data packet in each gateway, determine the queue corresponding to the data packet from the correspondence between queues and enterprise accounts, and write the data packet into the corresponding queue.
[0107] The mapping between queues and enterprise accounts can be stored in a database. Each queue corresponds to a unique enterprise account, and each data packet includes the enterprise account. Therefore, the queue corresponding to each data packet can be matched from the pre-stored mapping between queues and enterprise accounts. For the same gateway, data packets with the same enterprise account are written into the same queue, thus enabling the search for the corresponding queue for all data packets in the packet corresponding to each gateway.
[0108] In the above embodiments of this application, by writing all data packets corresponding to each gateway into queues distinguished by enterprise accounts, combined with step S102, the time spent sending data packets from the queue to be sent to the respective gateways of the data packets is reduced.
[0109] Step S104: Send the data packets in each queue to the gateway, and use the gateway to send the corresponding data packets to the terminal device corresponding to the user's phone number.
[0110] Specifically, based on routing technology, data packets in each queue are sent to the gateway corresponding to the gateway information. After the gateway receives several data packets, each gateway sends the data packets to the operator server corresponding to the gateway, and then the operator server sends the information to be sent to the terminal device corresponding to the phone number.
[0111] In this solution, after acquiring the data packet, the enterprise account in the data packet and the correspondence between the enterprise account and the gateway are used to determine several data packets corresponding to each gateway, that is, gateway information is added to the data packet; within the data packet group corresponding to each gateway, the data packet is written into the corresponding queue according to the different enterprise accounts of the user corresponding to the data packet; then, the data packets in each queue are sent to the gateway, and the gateway is used to send the corresponding data packets to the terminal device corresponding to the user's phone number.
[0112] Therefore, compared to related technologies that pile up data packets in a queue and then send the reply information in the queue to the gateway corresponding to each reply, this solution classifies data packets based on the correspondence between gateways in the data packets, and further classifies data packets for the same gateway into queues based on the enterprise account in the data packets. This allows data packets to be sent directly from the queue to the gateway corresponding to the enterprise account in the queue, avoiding the problem of slow speed in sending reply information to their respective gateways due to the accumulation of reply information data packets in the queue. This solution can improve the speed of sending information.
[0113] One possible implementation of this application embodiment, step S104, when sending the data packets in each queue to the gateway, may specifically include steps S1041 and S1042 (not shown in the figures), wherein:
[0114] Step S1041: Obtain the extraction speed corresponding to each gateway, where the extraction speed represents the number of data packets sent to the gateway per unit time.
[0115] Specifically, during the initialization of the unified communication platform for electronic devices, the extraction speed of each gateway can be obtained through pre-stored gateway information and pre-stored load ratios. The load ratio is the ratio of the number of data packets sent by all gateways corresponding to the unified communication platform per unit time, which can be obtained through custom settings. When the unified communication platform is running, the success rate of each gateway in sending information to be sent, or the remaining amount of information to be sent in the queue, is obtained. Based on the load ratio at initialization, a new load ratio is determined. The extraction speed of each gateway is determined, where the success rate of sending information to be sent represents the success rate of the gateway successfully sending the information to be sent to the terminal device corresponding to the user's phone number.
[0116] Understandably, when the unified communication platform is running, it adjusts the extraction speed of each gateway based on the remaining amount in the queue to be sent or the success rate of the gateway sending the information to be sent. This is to avoid allocating too many data packets to gateways with low success rates or causing severe backlog in the queue to be sent. This would result in delays in sending data packets from the queue to their respective gateways due to performance limitations of the location of the queue.
[0117] Step S1042: Based on the extraction speed of each gateway, determine the number of data packets corresponding to the number of packets from all queues corresponding to the gateway; send the number of data packets corresponding to the number of packets to the gateway.
[0118] The method for determining the number of data packets corresponding to the quantity from all queues corresponding to the gateway can be random extraction or average extraction, as long as the above effect is achieved, and this application embodiment is not limited thereto. Specifically, this application embodiment may select to extract data packets evenly from all queues corresponding to the gateway.
[0119] In this embodiment, after obtaining the extraction speed corresponding to each gateway, based on the extraction speed of each gateway, a number of data packets corresponding to a certain quantity are determined from all queues corresponding to the gateway; and the number of data packets corresponding to that quantity are sent to the gateway. This provides the unified communication platform with a pre-set extraction speed for each gateway, avoiding over- or under-allocation of tasks to each gateway. While ensuring that the number of data packets sent by each gateway is not zero, it improves the smoothness of data packet transmission by the gateways. The task quantity is the target number of data packets sent by each gateway per unit time.
[0120] In related technologies, when a unified communications platform receives a request from an enterprise, it authenticates the enterprise by determining whether the enterprise has sending permissions in order to charge the corresponding account for sending information. Sending permissions represent the enterprise's authority to send messages to target users using the unified communications platform. However, besides the disordered accumulation of data packets in the sending queue, when request information appears in a high-concurrency manner, the authentication process is based on a relational database. Since relational databases are physically stored databases, their processing capacity is weak for large amounts of request information. Therefore, the inventors discovered that a memory database can be replaced with a relational database to achieve fast authentication.
[0121] Specifically, in one possible implementation of this application embodiment, before step S101, steps S1001 to S1005 (not shown in the figures) may be included, wherein:
[0122] Step S1001: Obtain request information from several enterprises, wherein the request information includes at least the enterprise's account.
[0123] Each request information may include authentication request information, source IP, target user's phone number, and the specific content of the message to be sent. The source IP is the IP address of the enterprise corresponding to the request information, and the authentication request information may include the enterprise's account, digital certificate, identity token, any one of these, and password.
[0124] Step S1002: Obtain enterprise information for each enterprise based on the request information of each enterprise, wherein the enterprise information includes at least authentication information.
[0125] Specifically, for each request, determine whether the requested authentication information is an account and password;
[0126] If not, then based on the source IP, retrieve the account of the enterprise corresponding to the requested information from the memory database, and use the account and password as authentication information to obtain the enterprise information. Each enterprise information includes at least authentication information, which may include the account and password.
[0127] If so, the request information will be used as authentication information.
[0128] Through the above-described process of obtaining enterprise information, this application embodiment provides a way to obtain enterprise information for different forms of authentication information, which can improve the user experience of enterprises using the unified communication platform to a certain extent.
[0129] Step S1003: For each authentication information, based on the in-memory database, determine whether there is any identity information corresponding to the authentication information. The in-memory database includes at least multiple identity information, and each identity information includes the preset authentication information of each enterprise.
[0130] If any identity information exists that corresponds to the authentication information, it means that the account and password in the authentication information are correct.
[0131] If no identity information corresponding to the authentication information exists, it means that the account in the authentication information is correct but the password is incorrect.
[0132] In this embodiment of the application, the relational database is replaced with an in-memory database, thereby improving the speed of identity authentication from the perspective of the identity authentication process of the enterprise corresponding to each request information.
[0133] Step S1004: If not, send the first relevant prompt of authentication failure to the enterprise, wherein the first relevant prompt is the prompt that the system judges the enterprise's authentication information to be incorrect.
[0134] The first relevant prompt is a real-time prompt, meaning that the first relevant prompt will be sent immediately after the request for identity authentication fails.
[0135] When the account information is correct but the password is incorrect, it indicates a verification failure, meaning the company's password differs from the password stored in the database, leading to authentication failure. Step S1003 identifies that the company's authentication failure is due to a verification failure and sends a first relevant prompt to the company, indicating the reason for the authentication failure, thereby improving the efficiency of successful authentication on the next attempt.
[0136] Step S1005: If yes, then confirm that the enterprise authentication is successful, and obtain multiple data packets corresponding to each of the successfully authenticated enterprises based on the information of all successfully authenticated enterprises and their respective request information. Each data packet includes the enterprise's account, the unique user's phone number, and the information to be sent.
[0137] In this embodiment, request information from several enterprises is obtained, and then enterprise information for each enterprise is acquired based on the request information. For each authentication information, based on the correspondence in the in-memory database, it is determined whether the identity information corresponding to the authentication information can be successfully obtained. If not, a first relevant prompt indicating authentication failure is sent to the enterprise. If yes, the enterprise authentication is confirmed to be successful, and multiple data packets corresponding to each successfully authenticated enterprise are acquired based on all successfully authenticated enterprise information and their respective request information. It is evident that using an in-memory database to determine the existence of any identity information corresponding to the authentication information can better handle high concurrency of request information, avoiding a large backlog of request information during the identity authentication process, which would lead to the enterprise receiving too many first relevant prompts and resulting in a poor user experience for the unified communication platform.
[0138] In addition to determining whether each enterprise requesting information has sending authority, when the unified communications platform sends corresponding messages to the enterprise's target users based on the enterprise's request information, to avoid the messages containing sensitive words that could violate relevant laws and regulations, or the target users being blacklisted users who might negatively impact the enterprise or the unified communications platform, the inventors discovered that, after successful enterprise authentication but before obtaining all data packets related to the enterprise, all messages containing sensitive words can be filtered, and messages to target users belonging to blacklisted users can also be filtered, thus completing information filtering. This is to prevent negative impacts on the enterprise or the unified communications platform.
[0139] Specifically, in one possible implementation of this application embodiment, step S1005, when executing the process of obtaining multiple data packets corresponding to each of the successfully authenticated enterprises based on the information of all successfully authenticated enterprises and their corresponding request information, may include steps S1005-1 to S1005-4 (not shown in the accompanying drawings), wherein:
[0140] Step S1005-1: Based on the information of all successfully authenticated enterprises and their corresponding request information, obtain the user phone numbers corresponding to each of the successfully authenticated enterprise information.
[0141] The request information includes at least multiple users' phone numbers and multiple messages to be sent, with each user's phone number and message to be sent corresponding to another user.
[0142] Step S1005-2: Based on the preset user blacklist in the memory database, filter the blacklist users in the user phone numbers corresponding to each of the successfully authenticated enterprise information, and obtain a number of non-blacklisted user phone numbers corresponding to each of the successfully authenticated enterprise information.
[0143] Specifically, for each authorized user's phone number, it is determined whether any blacklisted user phone number exists that is identical to the authorized user's phone number. Here, each authorized user is the user corresponding to each successfully authenticated enterprise information. The in-memory database includes a preset user blacklist, which includes multiple blacklisted users and their corresponding phone numbers. For each authorized user's phone number, if it exists, the data packet corresponding to the authorized user is filtered; if it does not exist, the authorized user is treated as a non-blacklisted user, and several non-blacklisted user phone numbers corresponding to each of the successfully authenticated enterprise information are obtained.
[0144] The preset user blacklist can be obtained from the shared blacklist of multiple companies, and / or can be customized by the unified communications platform administrator.
[0145] Step S1005-3: Based on multiple preset sensitive words in the memory database, filter the information to be sent for each of the non-blacklisted user phone numbers to obtain the information to be sent for each of the filtered non-blacklisted user phone numbers.
[0146] Specifically, based on the messages to be sent corresponding to each of the filtered non-blacklisted user phone numbers, a keyword recognition network is used to identify and obtain several messages to be sent that do not contain preset sensitive words. The keyword recognition network is used to identify whether each message to be sent contains any sensitive words.
[0147] By using a highly accurate keyword recognition network to identify preset sensitive words, the system completes the filtering process for messages to be sent that contain any of the preset sensitive words. This results in data packets that do not contain sensitive words and whose target users are not hacked. This improves the accuracy of filtering preset sensitive words and enhances the overall accuracy of information filtering.
[0148] Step S1005-4: Determine each data packet based on each filtered message to be sent and the corresponding user's phone number and the company's account.
[0149] In this embodiment of the application, invalid information is filtered to avoid wasting time processing invalid information. The data processing process of filtering invalid information first and then processing valid information is realized to avoid resource waste. Invalid information is information to be sent corresponding to blacklisted users and / or containing any preset sensitive words, while valid information is information to be sent that does not correspond to blacklisted users and / or contain any preset sensitive words.
[0150] The reasons for enterprise identity authentication failure can include two types of errors: acquisition failure and verification failure. Acquisition failure can include three groups of error types: program failure, routing error, and timeout. Specific limitations for program failure, routing error, and timeout can be found in step S1004. That is, this application embodiment has provided corresponding solutions for identifying acquisition failure error types. Furthermore, each time enterprise authentication fails, the unified communication platform must send a relevant error message to the enterprise's terminal. In addition to identifying the acquisition failure error type, identifying whether the error type is verification failure is equally important.
[0151] Furthermore, in one possible implementation of this application embodiment, step S1003, before performing the determination, based on the memory database, whether any identity information corresponding to the authentication information exists for each authentication information, further includes steps S1003-1 to S1003-3 (not shown in the figures), wherein:
[0152] Step S1003-1: For each enterprise's account, based on all the preset enterprise accounts in the memory database, determine whether there is any preset enterprise account that is the same as the enterprise's account. The memory database includes at least a number of pre-stored authentication information corresponding to multiple enterprises, and each authentication information includes at least the enterprise's account.
[0153] Due to the fast data processing speed of in-memory databases, when confirming whether relevant information about each enterprise sending a request exists in the database, the pre-stored enterprise account can be stored in the in-memory database to improve the speed of judgment in the above embodiments.
[0154] If the judgment result exists, it means that the unified communications platform has the enterprise's account; if it does not exist, it means that the enterprise's account was not identified in the judgment process of the above embodiment.
[0155] The reasons for not identifying a company's account may include: program failure, i.e., a program failure in the unified communications platform; or routing error, i.e., a routing failure in the unified communications platform when receiving request information, causing the request information to be assigned to the wrong interface, and thus, at the interface, due to different business types, the relevant information of the company cannot be identified through authentication information. Each interface corresponds to a unique business type, which may include multiple businesses such as loan collection, marketing, and notification; or waiting timeout, i.e., when there is high concurrency of request information, the authentication information waiting for authentication at the identity authentication point cannot be processed in time, causing the waiting time for the information to be sent to expire.
[0156] For APIs, the same enterprise may have different APIs for different business types. When a request enters an API for a different business type, the enterprise may not have certain business types. Therefore, if the request enters the wrong API, the enterprise corresponding to the request may fail to authenticate.
[0157] Step S1003-2: If it does not exist, send a second relevant prompt to the enterprise.
[0158] The second relevant prompt indicates that the system cannot find relevant prompts for the current enterprise. The second relevant prompt can include relevant prompts for program failure, routing error and waiting timeout respectively.
[0159] Specifically, the methods for obtaining the relevant prompts corresponding to program failures, routing errors, and timeouts can include: obtaining the return value, where the return value corresponds to any one of the program failures, routing errors, and timeouts; based on the correspondence between the return value and any one of the program failures, routing errors, and timeouts, obtaining the reason why the relevant information of the enterprise was not identified; and based on the reason why the relevant information of the enterprise was not identified and the error table, obtaining the relevant prompt corresponding to the reason why the relevant information of the enterprise was not identified. The error table includes: a preset correspondence between each reason for not identifying the relevant information of the enterprise and each relevant prompt. For example, enterprise A sends request information 1 to the unified communication platform, and enterprise A only has marketing business permissions on the unified communication platform, where request information 1 corresponds to the marketing business; however, when the unified communication platform delegates request information 1 to the interface corresponding to the loan collection business, since enterprise A does not have the permissions corresponding to the loan collection business, enterprise A cannot obtain the corresponding identity information, resulting in authentication failure.
[0160] Step S1003-3: If it exists, then for each authentication information, based on the in-memory database, determine whether there is any identity information corresponding to the authentication information.
[0161] In this embodiment of the application, by using each enterprise's account and all the pre-stored enterprise accounts in the memory database, it is determined whether the memory database stores the same pre-stored enterprise account as the enterprise's account. If it is determined that the identity information corresponding to the enterprise cannot be obtained or the verification fails, based on steps S1003 to S1005, the reasons for the enterprise authentication failure are further refined, and the corresponding error type is fed back to the enterprise that failed the authentication, thereby further improving the efficiency for the enterprise to successfully authenticate.
[0162] In one possible implementation of this application embodiment, the data processing method may further include steps SA1 to SA3 (not shown in the accompanying drawings), wherein:
[0163] Step SA1: Obtain the number of messages to be sent successfully by each gateway per unit time.
[0164] A higher number of messages that a gateway can successfully send per unit of time indicates better gateway performance, and vice versa. The unit of time can be seconds, minutes, or hours. Understandably, a gateway with better performance can allocate more data packets, thereby increasing the total amount of messages successfully sent by the unified communication platform per unit of time.
[0165] Step SA2: Determine whether the difference between the number of messages successfully sent by each gateway per unit time and the preset number of messages successfully sent by each gateway per unit time is less than a set threshold.
[0166] A method is provided to determine whether the difference between the number of messages successfully sent by each gateway per unit time is less than a set threshold. Instead of directly comparing a fixed value with the number of messages successfully sent by each gateway per unit time, this method avoids excessive changes in the extraction speed of each gateway and ensures that resources in the unified communication platform are not wasted.
[0167] The preset number of messages to be sent successfully by each gateway per unit time can be obtained by calculating the average value of multiple historical data of the number of messages to be sent successfully by each gateway per unit time. The method for determining the threshold can include: constructing a normal distribution from multiple historical data of the number of messages to be sent successfully by each gateway per unit time to obtain a normal distribution graph; obtaining the historical data with the highest probability of occurrence based on the normal distribution graph, and using the historical data with the highest probability of occurrence as the set threshold.
[0168] Step SA3: If it is not less than, then update the load ratio of all gateways based on the number of messages successfully sent by each gateway per unit time. The load ratio is used to determine the extraction speed of each gateway.
[0169] During the initialization of the unified communication platform, the system utilizes the pre-stored gateway information and load ratio of each enterprise to obtain the extraction speed corresponding to each gateway. When the unified communication platform is running, if the speed is not less than the set threshold, the system uses the number of messages to be sent successfully by each gateway per unit time to obtain a new load ratio, updates the load ratio, and updates the extraction speed of each gateway according to the new load ratio.
[0170] In this embodiment, the load ratio of all gateways is adjusted in real time based on the number of messages successfully sent by each gateway per unit time, so as to improve the success rate of the unified communication platform in sending messages.
[0171] Another possible implementation of this application embodiment, the data processing method may further include steps SB1 and SB2 (not shown in the figures), wherein:
[0172] Step SB1: Obtain the remaining number of data packets in all queues corresponding to each gateway.
[0173] Step SB2: Determine whether the remaining quantity of each gateway is within the preset threshold range; if not, update the extraction speed based on the remaining quantity of each gateway and the set threshold range.
[0174] The extraction speed is updated based on the remaining quantity of each gateway and a preset threshold range. Specifically, this can include: for each gateway, determining the relationship between the remaining quantity of the gateway and the two endpoints of the preset threshold range; if the remaining quantity of the gateway is less than the smaller endpoint, increasing the gateway's extraction speed to achieve the update purpose; if the remaining quantity of the gateway is greater than the larger endpoint, decreasing the gateway's extraction speed to achieve the update purpose. The preset threshold range can be set according to actual usage.
[0175] In this embodiment of the application, the remaining number of data packets in all queues corresponding to each gateway is determined to determine whether each gateway can process the current number of data packets. If the remaining number exceeds the preset threshold range corresponding to each gateway, the number of data packets put from the memory database into the corresponding queue is appropriately reduced during the process of putting data packets into the corresponding queue. This is to alleviate the pressure on the structure where the queue to be sent is located and avoid stuttering when each data packet is sent to its corresponding gateway.
[0176] One possible implementation of this application embodiment, step S1001, may include steps S1001-1 and S1001-2 (not shown in the accompanying drawings), wherein:
[0177] Step S1001-1: Obtain initial request information from several enterprises.
[0178] The initial request information is the request information issued by the enterprise. The protocol type of the initial request information may include: the same or different protocol type as the protocol type that the electronic device can process.
[0179] At the same time, the unified communication platform may obtain initial request information from one or more enterprises. When there is only one enterprise, step S1001-2 can be executed for the initial request information of one enterprise; when there are multiple enterprises, step S1001-2 can be executed for the initial request information of multiple enterprises simultaneously, or step S1001-2 can be executed sequentially for the initial request information of each enterprise. This application embodiment does not specifically limit the simultaneous or sequential execution, and step S1001-2 can be executed for all initial request information.
[0180] Step S1001-2: For each initial request information, if the protocol type of the initial request information is different from the standard processable protocol type, the initial request information is converted to a protocol to obtain request information; if the protocol type of the initial request information is the same as the standard processable protocol type, the initial request information is determined to be request information.
[0181] To ensure the efficiency of the unified communication platform in sending information to be sent, when all initial request information enters the unified communication platform, for each initial request information, it can be first determined whether the protocol type of the initial request information is the same as the standard processable protocol type; if they are the same, the initial request information is used as the request information; if they are different, the protocol type of all the different initial request information is unified to the standard processable protocol type.
[0182] Accordingly, to ensure that data packets sent to each gateway can be forwarded to the terminal device of the target user corresponding to the data packet by each gateway, the protocol type of the data packet can be converted to the standard processable protocol type of the gateway corresponding to the data packet when each gateway obtains the data packet.
[0183] In this embodiment of the application, initial request information of multiple protocols can be processed simultaneously, eliminating the need for the enterprise to convert the information into a protocol type that the electronic device can process.
[0184] In one possible implementation of this application embodiment, the data processing method may further include:
[0185] Retrieve log records from the relational database. These log records include all data changes related to the data processing methods.
[0186] Specifically, the log record update cycle is obtained. The log record update cycle is used to write the data changes that occur in the unified communication platform in each log record update cycle into the relational database. Based on the log record update cycle, all data changes in the unified communication platform are written into the relational database. Then, when a log record retrieval instruction is obtained, the log record is retrieved from the relational database according to the log record retrieval instruction, which facilitates the subsequent analysis of the cause of the failure by technical personnel when the platform fails.
[0187] In this embodiment of the application, a physical storage relational database is used to store log records with a large amount of data, and the storage space of log records is guaranteed by using the relational database.
[0188] The above embodiments describe a data processing method from the perspective of process flow. The following embodiments describe a data processing device from the perspective of virtual module or virtual unit. For details, please refer to the following embodiments.
[0189] This application provides a data processing apparatus, such as... Figure 3 As shown, the data processing device may specifically include:
[0190] The data packet acquisition module 201 is used to acquire multiple data packets in real time. Each data packet includes at least the user's phone number, the information to be sent, and the company's account. The information to be sent is the specific information sent by the company to the user.
[0191] The gateway information assignment module 202 is used to determine the gateway information of each data packet based on the enterprise account of each data packet and the correspondence between the enterprise account and the gateway; and to determine the number of data packets corresponding to each gateway based on the gateway information.
[0192] The queuing module 203 is used to determine the queue corresponding to each data packet in each gateway from the correspondence between queues and enterprise accounts, and write the data packet into the corresponding queue. Each queue corresponds to a unique enterprise account.
[0193] The gateway sending module 204 is used to send the data packets in each queue to the gateway, and use the gateway to send the corresponding data packets to the terminal device corresponding to the user's phone number.
[0194] In this embodiment of the application, compared to the related technology of piling up several data packets in a queue to be sent and then sending the reply information in the queue to the gateway corresponding to each reply information, this solution classifies several data packets according to the gateway information in the data packets, and further classifies several data packets of the same gateway into queues according to the enterprise account in the data packets. This allows the data packets to be sent directly from the queue to the gateway corresponding to the enterprise account of the queue, avoiding the problem of slow speed when sending data packets to their respective gateways due to the accumulation of data packets in the queue. This solution can improve the speed of sending information.
[0195] In one possible implementation of this application embodiment, the gateway sending module 204, when executing the action of sending data packets in each queue to the gateway, is used for:
[0196] Obtain the extraction speed for each gateway, where the extraction speed represents the number of data packets sent to the gateway per unit time.
[0197] Based on the extraction speed of each gateway, determine the number of data packets corresponding to the number of packets in all queues corresponding to the gateway; and send the number of data packets corresponding to the number of packets to the gateway.
[0198] In one possible implementation of this application embodiment, the data packet acquisition module 201, before acquiring multiple data packets, further includes a request information processing module, used for:
[0199] Obtain request information from several companies, where the request information includes at least the company's account information;
[0200] Based on the request information from each enterprise, obtain the enterprise information of each enterprise, wherein the enterprise information includes at least authentication information;
[0201] For each authentication information, based on the in-memory database, it is determined whether there is any identity information corresponding to the authentication information. The in-memory database includes at least multiple identity information, and each identity information includes the pre-set authentication information of each enterprise.
[0202] If not, a first relevant prompt indicating authentication failure will be sent to the enterprise. The first relevant prompt is a prompt indicating that the system has determined that the enterprise's authentication information is incorrect.
[0203] If so, the enterprise authentication is confirmed to be successful, and based on the information of all successfully authenticated enterprises and their corresponding request information, multiple data packets corresponding to each successfully authenticated enterprise are obtained.
[0204] In one possible implementation of this application embodiment, the request information processing module, when executing the process of obtaining multiple data packets corresponding to each of the successfully authenticated enterprises based on the information of all successfully authenticated enterprises and their corresponding request information, is configured to:
[0205] Based on the information of all successfully authenticated enterprises and their corresponding request information, obtain the user phone numbers corresponding to each of the successfully authenticated enterprises. The request information includes at least the user phone number and the information to be sent.
[0206] Based on the preset user blacklist in the memory database, the blacklist users in the user phone numbers corresponding to each of the successfully authenticated enterprise information are filtered out, and a number of non-blacklisted user phone numbers corresponding to each of the successfully authenticated enterprise information are obtained.
[0207] Based on multiple preset sensitive words in the memory database, the system filters the information to be sent for each of the non-blacklisted user phone numbers and obtains the information to be sent for each of the filtered non-blacklisted user phone numbers.
[0208] Each data packet is determined based on each filtered message to be sent and the corresponding user's phone number and the company's account.
[0209] In one possible implementation of this application embodiment, the request information processing module, before performing the determination based on the in-memory database whether any identity information corresponding to the authentication information exists for each authentication information, further includes an enterprise confirmation module, used for:
[0210] For each enterprise's account, based on all the preset enterprise accounts in the in-memory database, determine whether there is any preset enterprise account that is the same as the enterprise's account. The in-memory database includes at least a number of pre-stored authentication information corresponding to multiple enterprises, and each authentication information includes at least the enterprise's account.
[0211] If it does not exist, a second relevant prompt will be sent to the enterprise. The second relevant prompt is a prompt that the system cannot find the relevant information for the current enterprise.
[0212] If it exists, then for each authentication information, based on the in-memory database, the step of determining whether any identity information corresponding to the authentication information exists is executed.
[0213] One possible implementation of the embodiments of this application further includes:
[0214] The extraction speed update module based on success rate is used for:
[0215] Get the number of messages to be sent successfully by each gateway per unit time.
[0216] Determine whether the difference between the number of messages successfully sent by each gateway per unit time and the preset number of messages successfully sent by each gateway per unit time is less than a set threshold.
[0217] If it is not less than, then the load ratio of all gateways is updated based on the number of messages successfully sent by each gateway per unit time. The load ratio is used to determine the extraction speed of each gateway.
[0218] One possible implementation of the embodiments of this application further includes:
[0219] The backlog-based extraction speed update module is used for:
[0220] Get the remaining number of data packets in all queues corresponding to each gateway;
[0221] Determine if the remaining quantity of each gateway is within a preset threshold range; if not, update the extraction speed based on the remaining quantity of each gateway and the set threshold range.
[0222] In one possible implementation of this application embodiment, the request information processing module, when executing the request information acquisition of several enterprises, is used for:
[0223] Obtain initial request information from several companies;
[0224] For each initial request message, if the protocol type of the initial request message is different from the standard processable protocol type, the initial request message is converted to a protocol to obtain the request message; if the protocol type of the initial request message is the same as the standard processable protocol type, the initial request message is determined to be the request message.
[0225] In one possible implementation of this application, the data processing apparatus further includes a log recording acquisition module, used for:
[0226] Retrieve log records from the relational database. These log records include all data changes related to the data processing methods.
[0227] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the data processing device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0228] This application provides an electronic device, such as... Figure 4 As shown, Figure 4The illustrated electronic device 30 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device may also include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of this electronic device does not constitute a limitation on the embodiments of this application.
[0229] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0230] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0231] The memory 303 may be a ROM (Read-Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM (Electrically Erasable Programmable Read-Only Memory), a CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0232] The memory 303 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0233] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Servers can also be included. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0234] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments. Compared with related technologies, this application's embodiment, instead of piling up multiple data packets in a queue and then sending the reply information in the queue to the gateway corresponding to each reply information, classifies multiple data packets according to the gateway information in the data packets, and further classifies multiple data packets from the same gateway according to the enterprise account in the data packets. This allows data packets to be sent directly from the queue to the gateway corresponding to the enterprise account in the queue, avoiding the problem of slow data packet delivery to their respective gateways due to data packet accumulation in the queue. This solution can improve the speed of information transmission.
[0235] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0236] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A data processing method, characterized by, The method comprises the following steps: real-time acquisition of request information of an enterprise side, and acquisition of a plurality of data packets according to the request information, each data packet comprising at least a telephone number of a user, to-be-sent information and an account of the enterprise, wherein the to-be-sent information is specific information to be sent by the corresponding enterprise to the user; for each enterprise, acquisition of gateway load information corresponding to the enterprise according to the account of the enterprise and a corresponding relationship between the account of the enterprise and a gateway in a database, and judgment of whether the gateway load information of the enterprise comprises only one gateway; classification of enterprises comprising only one gateway into a single-load enterprise group and classification of enterprises comprising a plurality of gateways into a multi-load enterprise group; for the single-load enterprise group, determination of gateway information of each data packet based on a telephone number of a user corresponding to each data packet of each enterprise and a corresponding relationship between the telephone number and gateway information in the database, wherein the corresponding relationship between the telephone number and the gateway information is determined by a corresponding relationship between the telephone number and an operator and a corresponding relationship between the operator and the gateway information; for each enterprise in the multi-load enterprise group, determination of gateway information of all data packets corresponding to the enterprise; each gateway information comprises first gateway information or second gateway information; the gateway corresponding to the first gateway information supports sending of messages by a unified communication platform to user terminals in all regions of the country; the gateway corresponding to the second gateway information supports sending of messages by the unified communication platform to user terminals in a specific province; determination of a plurality of data packets corresponding to each gateway according to the gateway information; for each data packet in each gateway, determination of a queue corresponding to the data packet from a corresponding relationship between the queue and the account of the enterprise, and writing of the data packet into the corresponding queue, wherein each queue corresponds to a unique account of the enterprise; sending of the data packet in each queue to the gateway, and sending of the corresponding data packet to a terminal device corresponding to the telephone number of the user by the gateway.
2. The data processing method according to claim 1, characterized in that, The sending of the data packet in each queue to the gateway comprises: acquisition of an extraction speed corresponding to each gateway, wherein the extraction speed represents a number of data packets sent to the gateway per unit time; determination of a plurality of data packets corresponding to the number from all queues corresponding to the gateway based on the extraction speed of each gateway; and sending of the plurality of data packets corresponding to the number to the gateway.
3. The data processing method of claim 1, wherein, Before the acquisition of the plurality of data packets, the method further comprises the following steps: acquisition of request information of a plurality of enterprises, wherein the request information comprises at least the account of the enterprise; acquisition of enterprise information of each enterprise according to the request information of each enterprise, wherein each enterprise information comprises at least authentication information; for each authentication information, judgment of whether there is any identity information corresponding to the authentication information based on an in-memory database, wherein the in-memory database comprises at least a plurality of identity information, and each identity information comprises pre-set authentication information of each enterprise; if not, sending of a first related prompt of authentication failure to the enterprise side, wherein the first related prompt is a related prompt of system judgment of an error of the authentication information of the enterprise; if yes, determination of authentication success of the enterprise, and acquisition of a plurality of data packets corresponding to each of all enterprises with authentication success according to all enterprise information with authentication success and the respective request information.
4. The data processing method according to claim 3, characterized in that, According to all the authentication success of enterprise information and the respective corresponding request information, obtain all the authentication success of enterprise information respectively corresponding to a plurality of data packets, including: According to all the authentication success of enterprise information and the respective corresponding request information, obtain all the authentication success of enterprise information respectively corresponding to a plurality of data packets, including: According to all the authentication success of enterprise information and the respective corresponding request information, obtain all the authentication success of enterprise information respectively corresponding to a plurality of data packets, including: Based on the preset user blacklist in the memory database, filter the blacklist users in the user phone numbers corresponding to all the authentication success of enterprise information, and obtain a plurality of non-black user phone numbers corresponding to all the authentication success of enterprise information; Based on the plurality of preset sensitive words in the memory database, filter the information to be sent according to all the non-black user phone numbers respectively corresponding to the information to be sent, and obtain the information to be sent after filtering respectively corresponding to a plurality of non-black user phone numbers; 5. The data processing method according to claim 3, characterized in that, According to each filtered information to be sent and the corresponding user's phone number and the account of the enterprise, determine each data packet. Before judging whether there is any identity information corresponding to the authentication information based on the memory database for each authentication information, it further includes: For each enterprise account, based on all the preset enterprise accounts in the memory database, it is judged whether any preset enterprise account is the same as the enterprise account, wherein the memory database at least includes a plurality of pre-stored authentication information corresponding to the enterprise, and each authentication information at least includes an enterprise account; If not, send a second related prompt to the enterprise side, wherein the second related prompt is a related prompt that the system cannot query the current enterprise; 6. The data processing method according to claim 2, characterized in that, If there is, execute the step of judging whether there is any identity information corresponding to the authentication information based on the memory database for each authentication information. It further includes: Obtain the number of information to be sent successfully sent by each gateway in unit time; Determine whether the difference between the number of information to be sent successfully sent by each gateway in unit time and the preset number of information to be sent successfully sent by each gateway in unit time is less than a set threshold value; If not, update the load ratio of all gateways according to the number of information to be sent successfully sent by each gateway in unit time, and the load ratio is used to determine the extraction speed of each gateway; Or, Obtain the remaining number of data packets in all queues corresponding to each gateway; 7. The data processing method according to claim 3, characterized in that, Determine whether the remaining number of each gateway is within a preset threshold range; if not, update the extraction speed according to the remaining number of each gateway and the preset threshold range. Obtain the request information of a plurality of enterprises, including: Obtain the initial request information of a plurality of enterprises; 8. The data processing method of claim 1, wherein, For each initial request information, when the protocol type of the initial request information is different from the standard processable protocol type, protocol conversion is performed on the initial request information to obtain the request information; when the protocol type of the initial request information is the same as the standard processable protocol type, the initial request information is determined as the request information. It further includes:
9. A data processing apparatus, characterized by Obtain log records from the relational database, wherein the log records include the related records of all data changes in the data processing method. It includes: The data packet acquisition module is configured to acquire request information of the enterprise end in real time, and acquire a plurality of data packets according to the request information, each data packet comprising at least a telephone number of a user, to-be-sent information and an account of the enterprise, wherein the to-be-sent information is specific information sent by the corresponding enterprise to the user. The gateway information assignment module is configured to, for each enterprise, acquire gateway load information corresponding to the enterprise according to the account of the enterprise and a corresponding relationship between the account of the enterprise and the gateway in a database, and determine whether the gateway load information of the enterprise comprises only one gateway. Enterprises comprising only one gateway are classified into a single-load enterprise group, and enterprises comprising a plurality of gateways are classified into a multi-load enterprise group. For the single-load enterprise group, gateway information of each data packet is determined according to the telephone number of the user corresponding to each data packet of each enterprise, based on a corresponding relationship between the telephone number and the gateway information in the database, wherein the corresponding relationship between the telephone number and the gateway information is determined by a corresponding relationship between the telephone number and an operator and a corresponding relationship between the operator and the gateway information. For each enterprise in the multi-load enterprise group, gateway information of all data packets corresponding to the enterprise is determined; each gateway information comprises first gateway information or second gateway information; the gateway corresponding to the first gateway information supports the unified communication platform to send messages to user terminals in all regions of the country; the gateway corresponding to the second gateway information supports the unified communication platform to send messages to user terminals in a specific province; and a number of data packets corresponding to each gateway are determined according to the gateway information. The queuing module is configured to, for each data packet in each gateway, determine a queue corresponding to the data packet from a corresponding relationship between the queue and the account of the enterprise, and write the data packet into the corresponding queue, wherein each queue corresponds to a unique account of the enterprise. The gateway sending module is configured to send the data packet in each queue to the gateway, and send the corresponding data packet to a terminal device corresponding to the telephone number of the user by using the gateway.
10. An electronic device, comprising: comprise: at least one processor; a memory; at least one application program, wherein the at least one application program is stored in the memory and configured to be executed by the at least one processor, and the at least one application program is configured to execute the method in any one of claims 1-8.
Citation Information
Patent Citations
Short message service unified scheduling method compatible to multiple operator gateways
CN107148007A