Data processing method and device, computer equipment and readable storage medium

By determining the location of the message server and message tasks on the hash ring and matching the location, the problem that the same message task in the terminal device is repeatedly executed by different message servers, and the effect of reducing business errors is achieved.

CN118921405APending Publication Date: 2024-11-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310516397.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

When the terminal device polls the message server, the same message task may be repeatedly executed by different message servers, resulting in business errors.

Method used

By determining the server routing location of the message server and the message routing location of the message task on the hash ring, location matching is performed to ensure that the same message task is sent to the message queue in the same message server, thereby avoiding repeated execution.

Benefits of technology

It reduces the possibility that the same message tasks are repeatedly executed, reduces the occurrence of business errors in terminal equipment, and improves the stability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921405A_ABST
    Figure CN118921405A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, computer equipment and a readable storage medium, and is applied to scenes such as cloud technology, artificial intelligence, intelligent traffic and auxiliary driving, and the method comprises the steps: determining server routing positions corresponding to S message servers on a hash ring and a message routing position corresponding to a message updating task; performing position matching on the message routing position and server routing positions corresponding to the S message servers respectively, and determining a target server routing position matched with the message routing position in the server routing positions corresponding to the S message servers respectively, determining a message server corresponding to the routing position of the target server as a target message server corresponding to the message updating task; and sending the update message task to the target message server. By adopting the method and the device, the possibility that the same message task is repeatedly executed can be reduced, so that the possibility that the service of the terminal equipment has errors is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer device, and readable storage medium. Background Art

[0002] The terminal device can poll the message server, determine the message server obtained by the polling traversal as the target message server corresponding to the message task, and send the message task to the target message server. For example, the terminal device can first obtain the target message task, and use the message server 1 obtained by the polling traversal as the target message server corresponding to the target message task; the terminal device can obtain the update message task again, and use the message server 2 obtained by the polling traversal as the target message server corresponding to the update message task.

[0003] In this way, when the target message task and the update message task are the same message task, the terminal device will send the same message task to different message servers (that is, send the target message task to message server 1, and send the update message task to message server 2), so that message server 1 and message server 2 execute the received message tasks respectively, resulting in the same message task being executed repeatedly, and then causing errors in the terminal device's business. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, computer device, and readable storage medium, which can reduce the possibility of repeated execution of the same message task, thereby reducing the possibility of errors in the services of the terminal device.

[0005] On the one hand, an embodiment of the present application provides a data processing method, including:

[0006] Determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message tasks on the hash ring; S is a positive integer;

[0007] Match the message routing position with the server routing positions corresponding to the S message servers, determine the target server routing position that matches the message routing position in the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task; the target message server includes message queues corresponding to N logical interfaces, respectively; N is a positive integer;

[0008] Send the update message task to the target message server; the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task among N message queues; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when the target message task exists in the target message queue; the update message task and the target message task are the same message task.

[0009] On the one hand, an embodiment of the present application provides a data processing device, including:

[0010] A position determination module is used to determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message task on the hash ring; S is a positive integer;

[0011] A position matching module is used to match the message routing position with the server routing positions corresponding to the S message servers, determine the target server routing position that matches the message routing position among the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task; the target message server includes message queues corresponding to N logical interfaces, respectively; N is a positive integer;

[0012] A task sending module is used to send an update message task to a target message server; the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task among N message queues; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when the target message task exists in the target message queue; the update message task and the target message task are the same message task.

[0013] Among them, the location determination module includes:

[0014] A first processing unit is used to perform hash ring routing processing on the server node identifiers corresponding to the S message servers respectively, to obtain the server routing positions of the S message servers respectively on the hash ring;

[0015] The second processing unit is used to obtain the update message task, perform hash ring routing processing on the message identifier corresponding to the update message task, and obtain the message routing position of the update message task on the hash ring.

[0016] The first processing unit is specifically used to perform hash calculation on the server node identifiers corresponding to the S message servers respectively, to obtain the server node hash identifiers corresponding to the S message servers respectively;

[0017] The first processing unit is specifically used to perform modulo processing on each server node hash identifier of the S server node hash identifiers and a hash ring parameter to obtain server node position parameters corresponding to the S server node hash identifiers respectively; the hash ring parameter is equal to the number of routing positions on the hash ring;

[0018] The first processing unit is specifically used to map the S server node location parameters to the routing positions on the hash ring, and determine the routing positions mapped by the S server node location parameters as the server routing positions of the S message servers on the hash ring respectively.

[0019] Among them, the S message servers include message server P j , j is a positive integer less than or equal to S;

[0020] The first processing unit is specifically used to process the message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier;

[0021] The first processing unit is specifically configured to send the message server P j The corresponding server node identifier and message server P j The corresponding server virtual identifier is determined to be the message server P j The corresponding server ID;

[0022] The first processing unit is specifically used to process the message server P j The corresponding server ID is hashed to obtain the message server P j The corresponding server hash identifier;

[0023] The first processing unit is specifically configured to send the message server P j The corresponding server hash identifier is modulo the hash ring parameter to obtain the message server P j The corresponding server location parameter; the hash ring parameter is equal to the number of routing locations on the hash ring;

[0024] The first processing unit is specifically configured to send the message server P j The corresponding server location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server location parameter is determined as the message server P j The server routing position on the hash ring.

[0025] The second processing unit is specifically used to perform hash calculation on the message identifier corresponding to the update message task to obtain the message hash identifier corresponding to the update message task;

[0026] The second processing unit is specifically used to perform modulo processing on the message hash identifier and the hash ring parameter to obtain a message position parameter corresponding to the message hash identifier; the hash ring parameter is equal to the number of routing positions on the hash ring;

[0027] The second processing unit is specifically configured to map the message position parameter to a routing position on the hash ring, and determine the routing position mapped by the message position parameter as the message routing position of the update message task on the hash ring.

[0028] Among them, the position matching module includes:

[0029] A range determination unit, configured to determine, on a hash ring, server routing ranges corresponding to the S message servers, respectively, according to the server routing positions corresponding to the S message servers, respectively;

[0030] A range matching unit, used to perform range matching between the message routing position and the server routing ranges corresponding to the S message servers, and determine the server routing range to which the message routing position belongs in the server routing ranges corresponding to the S message servers;

[0031] The location determination unit is used to determine the server routing location corresponding to the server routing range to which the message routing location belongs as the target server routing location that matches the message routing location.

[0032] The server routing locations corresponding to the S message servers include the server routing location M i , i is a positive integer less than or equal to K; K is equal to the total number of server routing positions corresponding to the S message servers; the K server routing positions are distributed in sequence along the routing direction on the hash ring;

[0033] Range determination unit, specifically for routing location M in the server i When it is the first server routing position among the K server routing positions, in the routing direction of the hash ring, it will be connected from the server routing position M K To server routing location M i The routing range between is determined as the server routing location M i Corresponding server routing range; server routing location M K is the last server routing position among the K server routing positions;

[0034] Range determination unit, specifically for routing location M in the server iIf it is not the first server routing position among the K server routing positions, in the routing direction of the hash ring, it will be forwarded from the server routing position M i-1 To server routing location M i The routing range between is determined as the server routing location M i Corresponding server routing range; server routing location M i-1 is the server routing position M among the K server routing positions i The previous server routing location of .

[0035] Among them, the message server P j The corresponding server routing location includes the message server P j The server node routing position determined by the corresponding server node identifier and the message server P j The server virtual routing position determined by the corresponding server virtual identifier; the message server P j The corresponding server node routing location is used to point to the message server P j Corresponding real node; message server P j The corresponding server virtual routing location is used to point to the message server P j The corresponding virtual node;

[0036] The location matching module is specifically used to match the target server routing location to the message server P j When the virtual routing position of the corresponding server is determined, the virtual node corresponding to the routing position of the target server is determined; the virtual node corresponding to the routing position of the target server belongs to the message server P j The corresponding virtual node;

[0037] The location matching module is specifically used to map the virtual nodes corresponding to the routing location of the target server, and to map the message server P j The corresponding real node is determined to be the real node corresponding to the routing location of the target server;

[0038] The location matching module is specifically used to match the message server P to the real node corresponding to the routing location of the target server. j Determine the target message server corresponding to the update message task.

[0039] The first processing unit is specifically used to obtain an identifier extension character string for identifier extension processing;

[0040] The first processing unit is specifically used to process the message server P j The corresponding server node identifier and identifier extension string are concatenated to obtain the message server P j The corresponding server virtual ID.

[0041] The first processing unit is specifically used to process the message server P j The corresponding server node identification is used to extract identification features and obtain the message server P j a node identification feature of the corresponding server node identification;

[0042] The first processing unit is specifically used to input the node identification feature into the identification extension model, perform feature extension on the node identification feature through the identification extension model, and obtain the identification extension feature corresponding to the node identification feature;

[0043] The first processing unit is specifically configured to decode the identification feature of the identification extension feature and generate a message server P j The corresponding server virtual ID.

[0044] The first processing unit is specifically used to process the message server P j The corresponding server node identifier is segmented to obtain the message server P j The segment identifier of the corresponding server node identifier;

[0045] The first processing unit is specifically used to perform feature conversion on the segment identifier to obtain segment features corresponding to the segment identifier;

[0046] The first processing unit is specifically configured to determine the segment identifier on the message server P j The identification position in the corresponding server node identification is position-encoded to obtain the position feature corresponding to the identification position;

[0047] The first processing unit is specifically used to fuse the segment features and the position features to obtain the message server P j The node identification feature of the corresponding server node identification.

[0048] On the one hand, an embodiment of the present application provides a data processing method, which is executed by a target message server and includes:

[0049] The receiving terminal device sends an update message task based on the target server routing position; the target server routing position is a server routing position that matches the message routing position, determined by the terminal device in the server routing positions corresponding to the S message servers after matching the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on the hash ring; S is a positive integer; the target server routing position refers to the server routing position corresponding to the target message server;

[0050] Determine a target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces respectively; N is a positive integer; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue;

[0051] When the target message task exists in the target message queue, the update message task is discarded; the update message task and the target message task are the same message task.

[0052] On the one hand, an embodiment of the present application provides a data processing device, which runs on a target message server and includes:

[0053] The task receiving module is used to receive the update message task sent by the terminal device based on the target server routing position; the target server routing position is a server routing position that matches the message routing position determined by the terminal device in the server routing positions corresponding to the S message servers after the terminal device matches the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on the hash ring; S is a positive integer; the target server routing position refers to the server routing position corresponding to the target message server;

[0054] The queue determination module is used to determine the target message queue corresponding to the update message task from the message queues corresponding to the N logical interfaces respectively; N is a positive integer; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue;

[0055] The task discarding module is used to discard the update message task when the target message task exists in the target message queue; the update message task and the target message task are the same message tasks.

[0056] The queue determination module is specifically used to obtain the command identifier in the update message task, and determine the message queue corresponding to the command identifier in the message queues corresponding to the N logical interfaces respectively;

[0057] The queue determination module is specifically used to determine the message queue corresponding to the command identifier as the target message queue corresponding to the update message task.

[0058] The device further comprises:

[0059] A task adding module, used for adding the update message task to the target message queue when there is no message task identical to the update message task in the target message queue, and recording the message entry time when the update message task is added to the target message queue;

[0060] The task adding module is used to obtain the time interval between the message entry time and the current time, and when the time interval is greater than or equal to the maximum delay time, the update message task in the target message queue is discarded.

[0061] An embodiment of the present application provides a computer device, including: a processor and a memory;

[0062] The processor is connected to the memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0063] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

[0064] In one aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in the embodiment of the present application.

[0065] In an embodiment of the present application, the terminal device can determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message task on the hash ring, and then match the message routing positions with the server routing positions corresponding to the S message servers, determine the target server routing positions that match the message routing positions in the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing positions as the target message server corresponding to the update message task. Further, the terminal device can directly send the update message task to the target message server. It can be understood that the update message task can be used to instruct the target message server to determine the target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces, and the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when there is a target message task identical to the update message task in the target message queue. It can be seen that since the same update message task and target message task can correspond to the same message routing location and service type, the same update message task and target message task can be sent to the same message queue (i.e., target message queue) in the same message server (i.e., target message server), reducing the possibility of the same message task (i.e., target message task and update message task) being repeatedly executed by different message servers, thereby reducing the possibility of errors in the terminal device's business. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 It is a structural diagram of a network architecture provided by an embodiment of the present application;

[0068] Figure 2 This is a schematic diagram of a scenario for data interaction provided by an embodiment of the present application;

[0069] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0070] Figure 4 This is a schematic diagram of a scenario of hash ring routing processing provided by an embodiment of the present application;

[0071] Figure 5ais a schematic diagram of a scene for performing position matching provided in an embodiment of the present application;

[0072] Figure 5b is a schematic diagram of a scene for performing position matching provided in an embodiment of the present application;

[0073] Figure 6 It is a schematic diagram of a scenario for processing an update message task provided by an embodiment of the present application;

[0074] Figure 7 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0075] Figure 8 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0076] Fig. 9 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0077] Fig.10a It is a schematic diagram of a scenario of discarding an update message task provided in an embodiment of the present application;

[0078] Fig.10b This is a schematic diagram of a scenario for adding an update message task provided by an embodiment of the present application;

[0079] Fig.11 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0080] Fig.12 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0081] Fig.13 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0083] It should be understood that artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0084] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0085] For details, see Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a message server cluster and a terminal device cluster. The terminal device cluster may specifically include one or more terminal devices, and the number of terminal devices in the terminal device cluster is not limited here. Figure 1 As shown, the multiple terminal devices may specifically include terminal device 3000a, terminal device 3000b, terminal device 3000c, ..., terminal device 3000n; terminal device 3000a, terminal device 3000b, terminal device 3000c, ..., terminal device 3000n may respectively be directly or indirectly connected to a message server in a message server cluster through wired or wireless communication, so that each terminal device may exchange data with a message server in the message server cluster through the network connection.

[0086] Each terminal device in the terminal device cluster may include: smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances (e.g., smart TVs), wearable devices, vehicle terminals, aircraft, and other intelligent terminals with data processing functions. The vehicle terminals may be terminal devices in smart transportation scenarios and assisted driving scenarios.

[0087] The message server cluster may specifically include one or more message servers, and the number of message servers in the message server cluster is not limited here. Figure 1 As shown, the multiple message servers may specifically include message server 4000a, message server 4000b, ..., message server 4000x. Message server 4000a, message server 4000b, ..., message server 4000x may respectively be directly or indirectly connected to the terminal devices in the terminal device cluster through wired or wireless communication, so that each message server may exchange data with the terminal devices in the terminal device cluster through the network connection.

[0088] Among them, Figure 1 The message server in the message server cluster shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0089] For ease of understanding, the embodiments of the present application can be Figure 1 Select one terminal device from the multiple terminal devices shown as the target terminal device. For example, in the embodiment of the present application, Figure 1 The terminal device 3000c shown is used as the target terminal device. For ease of understanding, the present application embodiment can be Figure 1 Select one message server from the multiple message servers shown as the target message server. For example, in the embodiment of the present application, Figure 1 The message server 4000a shown is used as the target message server. At this time, data interaction can be achieved between the target message server and the target terminal device.

[0090] It is understandable that the data processing method provided in the embodiment of the present application can be executed by a computer device, and the computer device can realize the circulation of the update message task through cloud technology. Among them, the target terminal device can send the update message task to the target message server after obtaining the update message task, so that the target message server can discard the update message task when there is a message task identical to the update message task in the target message queue; optionally, the target message server can add the update message task to the target message queue when there is no message task identical to the update message task in the target message queue, and then execute the update message task.

[0091] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support to be realized through cloud computing.

[0092] It is understandable that the above network framework can be applied to account registration scenarios, online shopping scenarios, cloud storage scenarios, cloud gaming scenarios, etc., and specific business scenarios will not be listed one by one here. For example, in the account registration scenario, the target terminal device can send an update message task to the target message server based on the account registration request, and executing the update message task can represent the operation performed by implementing the account registration. For example, executing the update message task can represent the verification of the account registration request, and can also represent the verification of the account and password entered for the account registration, and can also represent the writing of the account and password entered for the account registration into the database, etc. For another example, in the online shopping scenario, the target terminal device can send an update message task to the target message server based on the online shopping request, and executing the update message task can represent the operation performed by implementing the online shopping. For example, executing the update message task can represent the modification of the basic information of the online shopping, and can also represent the sending of the online shopping list to the warehouse, and can also represent the allocation of the delivery personnel for the online shopping, etc. For another example, in the cloud storage scenario, the target terminal device can send an update message task to the target message server based on the cloud storage request, and executing the update message task can represent the operation performed by implementing the cloud storage. For example, executing an update message task can mean comparing the capacity of the storage space with the capacity of the storage content, or obtaining the account level of the cloud storage, or writing the storage content into the database, etc. For another example, in a cloud game scenario, the target terminal device can send an update message task to the target message server based on a cloud game request, and executing an update message task can mean implementing the operations performed by the cloud game. For example, executing an update message task can mean a cloud editing service, a cloud comment service, or managing cloud trial videos, etc.

[0093] For further understanding, please refer to Figure 2 , Figure 2 Schematic diagram of a scenario for data interaction provided by an embodiment of the present application. Figure 2 The message server 20a shown may be the above Figure 1 The target message server in the corresponding embodiment is as follows: Figure 2 The terminal device 20b shown may be the above Figure 1 The target terminal device, the message server 20a and the terminal device 20b in the corresponding embodiment can jointly implement the task execution of the update message task.

[0094] like Figure 2 As shown, the terminal device 20b can obtain S message servers in the message server cluster, where S can be a positive integer, and the S message servers can specifically include message servers 21a, ..., message servers 21b. Further, the terminal device 20b can determine the server routing locations corresponding to the S message servers (i.e., message servers 21a, ..., message servers 21b) on the hash ring. Among them, one message server can correspond to one or more server routing locations.

[0095] For ease of understanding, here we take one message server corresponding to two server routing locations as an example for explanation. Among them, the server routing location corresponding to the message server 21a may include the server routing location 22a and the server routing location 23a, and the server routing location corresponding to the message server 21b may include the server routing location 22b and the server routing location 23b.

[0096] like Figure 2 As shown, the terminal device 20b can obtain the update message task and determine the message routing position corresponding to the update message task on the hash ring. Among them, one update message task can correspond to one message routing position. Further, the terminal device 20b can match the message routing position with the server routing positions corresponding to the S message servers, that is, match the message routing position with the server routing position 22a, server routing position 23a, ..., server routing position 22b, and server routing position 23b, and determine the target server routing position that matches the message routing position among the server routing positions 22a, server routing positions 23a, ..., server routing positions 22b, and server routing positions 23b. For example, the terminal device 20b can determine the server routing position 23a as the target server routing position.

[0097] like Figure 2As shown, the terminal device 20b can determine the message server corresponding to the target server routing position (for example, message server 21a) as the target message server corresponding to the update message task, and then send the update message task to the message server 20a (for example, determine the message server 21a as the message server 20a). Among them, the message server 20a can include message queues corresponding to N logical interfaces respectively, and the N logical interfaces can be used to provide different services. Here, N can be a positive integer, and the N message queues can specifically include message queues 24a, ..., message queues 24b.

[0098] like Figure 2 As shown, after receiving the update message task, the message server 20a can obtain the service type associated with the update message task, determine the message queue associated with the service type associated with the update message task in N message queues (i.e., message queues 24a, ..., message queues 24b), and determine the message queue associated with the service type associated with the update message task as the message queue corresponding to the update message task (i.e., the target message queue). For example, the message server 20a can determine the message queue 24a as the target message queue. The service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue.

[0099] like Figure 2 As shown, the message server 20a may discard the update message task when there is a message task (e.g., target message task) identical to the update message task in the message queue 24a. Optionally, the message server 20a may add the update message task to the message queue 24a when there is no message task (e.g., target message task) identical to the update message task in the message queue 24a. In this way, the message server 20a may perform task execution on the update message task in the message queue 24a (i.e., execute the update message task in the message queue 24a).

[0100] It can be seen that the embodiment of the present application can determine the target message server corresponding to the update message task in the S message servers according to the message routing position of the update message task on the hash ring and the server routing positions of the S message servers on the hash ring, and then directly send the update message task to the target message queue in the target message server, so that the update message task can be sent to the message queue in the message server where the target message task is located, reducing the possibility of the same message task being repeatedly executed, thereby reducing the possibility of errors in the terminal device's business. In addition, when the same message task is repeatedly executed, the computing resources of the message server will also be wasted.

[0101] For further information, see Figure 3 , Figure 3This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a message server, or by a terminal device, or by both a message server and a terminal device. The message server can be the above-mentioned Figure 2 The message server 20a in the corresponding embodiment, the terminal device can be the above Figure 2 The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S101-S103:

[0102] Step S101, determining server routing positions corresponding to S message servers and message routing positions corresponding to update message tasks on a hash ring;

[0103] Specifically, the terminal device can perform hash ring routing processing on the server node identifiers corresponding to the S message servers, respectively, to obtain the server routing positions of the S message servers on the hash ring. Here, S can be a positive integer. Further, the terminal device can obtain an update message task, perform hash ring routing processing on the message identifier (i.e., UIN, User Identification Number) corresponding to the update message task, and obtain the message routing position of the update message task on the hash ring. The terminal device can generate a hash ring through a consistent hashing algorithm. The hash ring can be regarded as a circular ring composed of multiple points (i.e., routing positions). Both the server routing position and the message routing position can be points located on the hash ring, thereby realizing the rapid positioning of the update message task and the S message servers on the hash ring.

[0104] The specific process of the terminal device performing hash ring routing processing on the server node identifiers corresponding to the S message servers can be found in the following Figure 7 The description of steps S201 to S203 in the corresponding embodiment, or the following Figure 8 The description of steps S301 to S305 in the corresponding embodiment.

[0105] Among them, it can be understood that the specific process of the terminal device performing hash ring routing processing on the message identifier corresponding to the update message task (i.e., routing the message identifier) ​​can be described as: the terminal device can perform hash calculation on the message identifier corresponding to the update message task to obtain the message hash identifier corresponding to the update message task. Further, the terminal device can perform modulo processing on the message hash identifier and the hash ring parameter to obtain the message position parameter corresponding to the message hash identifier. Among them, the hash ring parameter is equal to the number of routing positions on the hash ring. Further, the terminal device can map the message position parameter to the routing position on the hash ring, and determine the routing position mapped by the message position parameter as the message routing position of the update message task on the hash ring.

[0106] It should be understood that the update message task can be an update message task corresponding to a call request (for example, an account registration request, an online shopping request). The call request can also be referred to as a call chain. Different call chains can have different message identifiers (for example, 12345). The message identifiers of multiple message tasks corresponding to the same call chain are the same. Therefore, the message identifier can be understood as the identifier of the call chain, and the message identifier can be used to uniquely identify a call chain. In other words, the message identifier is the information carried by the call request, which can run through the entire call chain, and the message identifier can be generated in real time. In addition, different message tasks can have different task identifiers, and the task identifier can be understood as the identifier of the message task, and the task identifier can be used to uniquely identify a message task.

[0107] Among them, the terminal device can perform hash calculation on the message identifier corresponding to the update message task through a hash algorithm. The hash algorithm can be understood as a message digest algorithm, which is used to compress the input data (for example, the message identifier) ​​to obtain output data with a fixed format (for example, a message hash identifier). In addition, the hash function is one-way unique. For different input data, the hash function can generate different output data. The output data obtained after the input data is hashed by the same hash function is the same. It should be understood that the embodiment of the present application does not limit the hash algorithm used for the hash calculation. For example, the hash algorithm can be a Message Digest (MD) algorithm (for example, an MD5 algorithm) or a Secure Hash Algorithm (SHA) algorithm (for example, a SHA256 algorithm).

[0108] The remainder processing can use the message hash identifier as the dividend and the hash ring parameter as the divisor. The remainder obtained by dividing the dividend by the divisor is the message position parameter corresponding to the message hash identifier. The message position parameter is a non-negative integer less than the hash ring parameter. For example, when the hash ring parameter is equal to 2 32 When the message position parameter is less than 232 A non-negative integer (that is, the message position parameter is greater than or equal to 0 and less than 2 32 ).

[0109] It should be understood that the embodiments of the present application do not limit the specific values ​​of the hash ring parameters. For example, when the message hash identifier is equal to 6 and the hash ring parameter is equal to 4, the message position parameter is equal to 2; for another example, when the message hash identifier is equal to 7 and the hash ring parameter is equal to 4, the message position parameter is equal to 3; for another example, when the message hash identifier is equal to 8 and the hash ring parameter is equal to 4, the message position parameter is equal to 0.

[0110] For easier understanding, see Figure 4 , Figure 4 Schematic diagram of a hash ring routing scenario provided by an embodiment of the present application. Figure 4 The message servers 40a, 40b and 40c shown may be the above-mentioned Figure 1 In the message servers in the message server cluster of the corresponding embodiment, the message identifier 41a, the message identifier 41b and the message identifier 41c may be different message identifiers.

[0111] like Figure 4 As shown, when the message identifier corresponding to the update message task is message identifier 41a, the terminal device can perform hash calculation on the message identifier 41a to obtain the message hash identifier 42a (for example, 6) corresponding to the update message task, and then perform modulo processing on the message hash identifier 42a and the hash ring parameter (for example, 4) to obtain the message position parameter 43a corresponding to the message hash identifier 42a. Optionally, when the message identifier corresponding to the update message task is message identifier 41b, the terminal device can perform hash calculation on the message identifier 41b to obtain the message hash identifier 42b (for example, 7) corresponding to the update message task, and then perform modulo processing on the message hash identifier 42b and the hash ring parameter (for example, 4) to obtain the message position parameter 43b corresponding to the message hash identifier 42b. Optionally, when the message identifier corresponding to the update message task is message identifier 41c, the terminal device can perform a hash calculation on the message identifier 41c to obtain a message hash identifier 42c (for example, 8) corresponding to the update message task, and then perform a modulo processing on the message hash identifier 42c and the hash ring parameter (for example, 4) to obtain a message position parameter 43c corresponding to the message hash identifier 42c.

[0112] Further, the terminal device may map the message position parameter 43a to the message routing position on the hash ring, map the message position parameter 43b to the message routing position on the hash ring, and map the message position parameter 43c to the message routing position on the hash ring.

[0113] Step S102, position matching is performed between the message routing position and the server routing positions corresponding to the S message servers, a target server routing position matching the message routing position is determined among the server routing positions corresponding to the S message servers, and the message server corresponding to the target server routing position is determined as the target message server corresponding to the update message task;

[0114] Specifically, the terminal device can determine the server routing ranges corresponding to the S message servers on the hash ring according to the server routing positions corresponding to the S message servers. Further, the terminal device can match the message routing position with the server routing ranges corresponding to the S message servers, and determine the server routing range to which the message routing position belongs in the server routing ranges corresponding to the S message servers. Further, the terminal device can determine the server routing position corresponding to the server routing range to which the message routing position belongs as the target server routing position that matches the message routing position. In other words, the terminal device can find the nearest server routing position as a routing point (i.e., the target server routing position) along the routing direction on the hash ring through the message routing position corresponding to the message identifier. Further, the terminal device can determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task, thereby quickly locating the target message server corresponding to the update message task. Among them, the target message server includes message queues corresponding to N logical interfaces, where N can be a positive integer, and the N logical interfaces can be used to implement different functions respectively.

[0115] For easier understanding, please refer to Figure 4 .like Figure 4 As shown, the terminal device can determine the server routing location that matches the message routing location mapped by the message location parameter 43a (i.e., the server routing location corresponding to the message server 40a) among the server routing locations corresponding to the S message servers respectively, determine the server routing location that matches the message routing location mapped by the message location parameter 43b (i.e., the server routing location corresponding to the message server 40b) among the server routing locations corresponding to the S message servers respectively, and determine the server routing location that matches the message routing location mapped by the message location parameter 43c (i.e., the server routing location corresponding to the message server 40c) among the server routing locations corresponding to the S message servers respectively.

[0116] The server routing locations corresponding to the S message servers may include the server routing location M i, where i can be a positive integer less than or equal to K; K is equal to the total number of server routing positions corresponding to the S message servers, and the K server routing positions are distributed in sequence along the routing direction on the hash ring. It should be understood that the specific process of the terminal device determining the server routing ranges corresponding to the S message servers according to the server routing positions corresponding to the S message servers can be described as follows: at the server routing position M i When i is the first server routing position among the K server routing positions (i.e., i is equal to 1), the terminal device can route the route from the server routing position M in the routing direction of the hash ring. K To server routing location M i The routing range between is determined as the server routing location M i The corresponding server routing range. Among them, the server routing location M K is the last server routing position among the K server routing positions. Optionally, at server routing position M i When it is not the first server routing position among the K server routing positions (i.e., i is not equal to 1), the terminal device can route the route from the server routing position M in the routing direction of the hash ring. i-1 To server routing location M i The routing range between is determined as the server routing location M i The corresponding server routing range. Among them, the server routing location M i-1 is the server routing position M among the K server routing positions i The previous server routing location of .

[0117] The routing direction may be a clockwise direction on the hash ring or a counterclockwise direction on the hash ring, which is not limited in the present application. For ease of understanding, the present application embodiment takes the clockwise direction on the hash ring as an example for explanation.

[0118] Among them, one message server can correspond to one server routing position or multiple server routing positions. When one message server corresponds to one server routing position, S is equal to K; when one message server can correspond to multiple server routing positions, K is greater than S. In addition, the number of server routing positions corresponding to each message server can be the same or different. For ease of understanding, the embodiment of the present application is described by taking the example that the number of server routing positions corresponding to each message server is the same.

[0119] Therefore, the embodiment of the present application can realize the division of the hash ring, determine the server routing ranges corresponding to the S message servers respectively on the hash ring, so as to quickly realize the range matching of the message routing position and the server routing ranges corresponding to the S message servers respectively, and then quickly realize the position matching of the message routing position and the server routing positions corresponding to the S message servers respectively. Among them, the server routing ranges corresponding to the S message servers respectively can be continuous or discontinuous; when one message server corresponds to one server routing position, the server routing ranges corresponding to the S message servers respectively are continuous; when one message server corresponds to multiple server routing positions, the server routing ranges corresponding to the S message servers respectively can be continuous or discontinuous.

[0120] For easier understanding, see Figure 5a and Figure 5b , Figure 5a and Figure 5b is a schematic diagram of a scene for position matching provided in an embodiment of the present application. Figure 5a As shown, one message server corresponds to one server routing position as an example for explanation, and the S message servers may include message server 51a, message server 51b and message server 51c. The server routing position corresponding to message server 51a (i.e., server routing position M1), the server routing position corresponding to message server 51b (i.e., server routing position M2) and the server routing position corresponding to message server 51c (i.e., server routing position M3) are distributed in sequence along the routing direction (e.g., clockwise) on the hash ring. Among them, server routing position M1 may be the first server routing position among the K (i.e., S) server routing positions, server routing position M2 may be the second server routing position among the K server routing positions, and server routing position M3 may be the third server routing position among the K server routing positions (i.e., the last server routing position).

[0121] like Figure 5a As shown, the terminal device can determine the routing range from the server routing position M1 to the server routing position M2 as the server routing range corresponding to the server routing position M2 in the routing direction; determine the routing range from the server routing position M2 to the server routing position M3 (i.e., routing range 50c) as the server routing range corresponding to the server routing position M3; and determine the routing range from the server routing position M3 to the server routing position M1 as the server routing range corresponding to the server routing position M1.

[0122] like Figure 5aAs shown, when the message routing position 52a is the message routing position corresponding to the update message task, the server routing range to which the message routing position 52a belongs may be the server routing range corresponding to the server routing position M1, the server routing position M1 may be the target server routing position that matches the message routing position 52a, and the message server 51a may be the target message server corresponding to the update message task; when the message routing position 52b is the message routing position corresponding to the update message task, the server routing range to which the message routing position 52b belongs may be the server routing range corresponding to the server routing position M2, the server routing position M2 may be the target server routing position that matches the message routing position 52b, and the message server 51b may be the target message server corresponding to the update message task; when the message routing position 52c is the message routing position corresponding to the update message task, the server routing range to which the message routing position 52c belongs may be the server routing range (i.e., routing range 50c) corresponding to the server routing position M3, the server routing position M3 may be the target server routing position that matches the message routing position 52c, and the message server 51c may be the target message server corresponding to the update message task.

[0123] like Figure 5b As shown, a message server corresponding to multiple (for example, 3) server routing positions is used as an example for explanation. The S message servers may include message server 54a, message server 54b and message server 54c. The server routing position corresponding to message server 54a may be server routing position M2, server routing position M4 and server routing position M6. The server routing position corresponding to message server 54b may be server routing position M5, server routing position M7 and server routing position M9. The server routing position corresponding to message server 54c may be server routing position M1, server routing position M3 and server routing position M8. Server routing position M1, server routing position M2, ..., server routing position M9 are distributed in sequence along the routing direction (for example, clockwise) on the hash ring. Among them, server routing position M1 may be the first server routing position among K (i.e., S*3) server routing positions, ..., and server routing position M9 may be the ninth server routing position (i.e., the last server routing position) among the K server routing positions.

[0124] like Figure 5bAs shown, the terminal device can determine the routing range from the server routing position M1 to the server routing position M2 (i.e., routing range 53c) in the routing direction as the server routing range corresponding to the server routing position M2; ...; and determine the routing range from the server routing position M9 to the server routing position M1 as the server routing range corresponding to the server routing position M1.

[0125] like Figure 5b As shown, when the message routing position 57a ​​is the message routing position corresponding to the update message task, the server routing range to which the message routing position 57a ​​belongs can be the server routing range corresponding to the server routing position M2 (i.e., routing range 53c), the server routing position M2 can be the target server routing position that matches the message routing position 57a, and the message server 54a can be the target message server corresponding to the update message task.

[0126] Step S103: sending the update message task to the target message server.

[0127] Among them, the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task in N message queues, and the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task through the delayed delivery mechanism (also referred to as delayed merging mechanism, delayed merging mechanism) of the message queue when the target message task exists in the target message queue, thereby ensuring that the message queue can only have one identical message task within the limited time (i.e., the maximum delay time). Among them, the update message task and the target message task can be the same message task (referred to as task). Optionally, the target message queue is also used to instruct the target message server to add the update message task to the target message queue when there is no message task identical to the update message task in the target message queue.

[0128] It is understandable that the same message task has the same message identifier, that is, the message identifier corresponding to the update message task and the message identifier corresponding to the target message task are the same. In order to implement the delayed delivery mechanism, the terminal device needs to ensure that the target message task and the update message task can be routed to the same message server and the same message queue. Among them, the message server can also be called an MQ (Message Queue) machine, and the message queue can also be called an MQ queue. MQ is a technology for the background (i.e., the message server) to execute asynchronous tasks.

[0129] For example, when the target message task and the update message task are both message tasks in the account registration scenario, the target message task and the update message task can register the account for the same account and password. When both the target message task and the update message task are executed, the registration may fail (i.e., an error occurs in the service of the terminal device); for another example, when the target message task and the update message task are both message tasks in the online shopping scenario, the target message task and the update message task can assign a delivery person to the same online shopping order. When both the target message task and the update message task are executed, an error may occur in the delivery of goods (i.e., an error occurs in the service of the terminal device). ); for another example, when the target message task and the update message task are both message tasks in the cloud storage scenario, the target message task and the update message task can write the same storage content into the database. When both the target message task and the update message task are executed, the same storage content may be stored repeatedly (i.e., an error occurs in the service of the terminal device); for another example, when the target message task and the update message task are both message tasks in the cloud gaming scenario, the target message task and the update message task can send the same game review. When both the target message task and the update message task are executed, the game review may be repeated (i.e., an error occurs in the service of the terminal device).

[0130] It is understandable that the terminal device can obtain the target message task before obtaining the update message task, determine the target message server corresponding to the target message task among the S message servers, and then send the target message task to the target message server. The specific process of the terminal device determining the target message server corresponding to the target message task among the S message servers can be found in the description of determining the target message server corresponding to the update message task among the S message servers, and will not be repeated here.

[0131] It should be understood that the terminal device can send an update message task to the target message server when the target message server does not perform the task execution on the target message task, so that the target message server performs the task execution on the update message task. For example, when the target message task is a message task in the account registration scenario, the target message server does not return a successful registration prompt to the terminal device. At this time, the terminal device can regenerate an update message task for the account registration scenario and send the update message task to the target message server. For another example, when the target message task is a message task in the online shopping scenario, the target message server does not return a successful order prompt to the terminal device. At this time, the terminal device can regenerate an update message task for the online shopping scenario and send the update message task to the target message server. For another example, when the target message task is a message task in the cloud storage scenario, the target message server does not return a successful storage prompt to the terminal device. At this time, the terminal device can regenerate an update message task for the cloud storage scenario and send the update message task to the target message server. For another example, when the target message task is a message task in a cloud gaming scenario, the target message server does not return a cloud trial video to the terminal device. At this time, the terminal device can regenerate an update message task for the cloud gaming scenario and send the update message task to the target message server.

[0132] For easier understanding, see Figure 6 , Figure 6 Schematic diagram of a scenario for processing an update message task provided by an embodiment of the present application. Figure 6 As shown, the message server cluster may include message server 60a, message server 60b and message server 60c, the terminal device may include a caller service and a consistent hash service, the message server may include a consumer service, the caller service may be used to deliver tasks (for example, update message tasks), the consistent hash service may be used to execute steps S101-S102, and the consumer service may be used to execute message tasks (for example, target message tasks).

[0133] like Figure 6 As shown, the terminal device can deliver the update message task through the caller service and send the update message task to the consistent hash service. In other words, the caller service can specify the command identifier (the command identifier can be used to determine the target message queue), and plant the message identifier of the call chain to make a request to the consistent hash service. Furthermore, the terminal device can determine the target message server corresponding to the update message task through the consistent hash service. In other words, the consistent hash service can route the message identifier through the consistent hash algorithm. For example, the target message server corresponding to the update message task can be message server 60b.

[0134] like Figure 6As shown, the terminal device can send the update message task to the message server 60b, wherein the message server 60b can include message queues corresponding to N logical interfaces respectively, and the N message queues can specifically include message queues 61a, message queues 61b, ..., message queues 61c, and the message server 60b can include consumer services corresponding to the message queues 61a, message queues 61b, ..., message queues 61c respectively, and the tasks in the message queues 61a, message queues 61b, ..., message queues 61c will be executed by the consumer services after entering the queue, queuing, and exiting the queue. Among them, the message queue 61a can include but is not limited to tasks 62a, task 62b, and task 62c, the message queue 61b can include but is not limited to tasks 63a, task 63b, and task 63c, and the message queue 61c can include but is not limited to tasks 64a, task 64b, and task 64c.

[0135] like Figure 6 As shown, the message server 60b can determine the target message queue corresponding to the update message task in the message queue 61a, the message queue 61b, ..., the message queue 61c. For example, the target message queue corresponding to the update message task can be the message queue 61b. Therefore, the message server 60b can add the update message task to the message queue 61b (at this time, the update message task is queued and waits for execution) or discard the update message task according to the message tasks in the message queue 61b.

[0136] Among them, the task identifier of task 63a can be task identifier 65d, the message identifier of task 63a can be message identifier 66d, and the command identifier of task 63a can be command identifier 67d; the task identifier of task 63b can be task identifier 65e, the message identifier of task 63b can be message identifier 66e, and the command identifier of task 63b can be command identifier 67e; the task identifier of task 63c can be task identifier 65f, the message identifier of task 63c can be message identifier 66f, and the command identifier of task 63c can be command identifier 67f. Similarly, task 62a, task 62b, task 62c, task 64a, task 64b, and task 64c can have task identifiers, message identifiers, and command identifiers.

[0137] like Figure 6 As shown, the message server 60b can obtain the to-be-executed message task from the message queue 61b through the consumer service corresponding to the message queue 61b, wherein, since the message queue has a first-in-first-out feature, when task 63a is the first message task to enter the message queue 61b, the consumer service can determine task 63a as the to-be-executed message task and delete task 63a from the message queue 61b (i.e., task 63a is dequeued).

[0138] In an embodiment of the present application, the terminal device can determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message task on the hash ring, and then match the message routing positions with the server routing positions corresponding to the S message servers, determine the target server routing positions that match the message routing positions in the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing positions as the target message server corresponding to the update message task. Further, the terminal device can directly send the update message task to the target message server. It can be understood that the update message task can be used to instruct the target message server to determine the target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces, and the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when there is a target message task identical to the update message task in the target message queue. It can be seen that since the same update message task and target message task can correspond to the same message routing location and service type, the same update message task and target message task can be sent to the same message queue (i.e., target message queue) in the same message server (i.e., target message server), reducing the possibility of the same message task (i.e., target message task and update message task) being repeatedly executed by different message servers, thereby reducing the possibility of errors in the terminal device's business.

[0139] For further information, see Figure 7 , Figure 7 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a message server, or by a terminal device, or by both a message server and a terminal device. The message server can be the above-mentioned Figure 2 The message server 20a in the corresponding embodiment, the terminal device can be the above Figure 2 The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S201-S205:

[0140] Step S201, performing hash calculation on the server node identifiers corresponding to the S message servers respectively, to obtain the server node hash identifiers corresponding to the S message servers respectively;

[0141] Among them, one message server can correspond to one server node identifier, and one message server can correspond to one server node hash identifier, that is, one server node identifier can be used to generate one server node hash identifier. The specific process of the terminal device performing hash calculations on the S server node identifiers can refer to the above description of performing hash calculations on the message identifier corresponding to the update message task, which will not be repeated here.

[0142] It should be understood that the embodiment of the present application does not limit the identification type of the server node identification corresponding to the message server. For example, the server node identification can be the IP address (Internet Protocol Address) of the message server or the host name of the message server.

[0143] Step S202, performing modulo processing on each server node hash identifier of the S server node hash identifiers and the hash ring parameter to obtain server node position parameters corresponding to the S server node hash identifiers;

[0144] Among them, the hash ring parameter is equal to the number of routing positions on the hash ring, and one server node hash identifier can correspond to one server node position parameter. The specific process of the terminal device performing modulo processing on each server node hash identifier of the S server node hash identifiers and the hash ring parameter can be referred to the above description of performing modulo processing on the message hash identifier and the hash ring parameter, which will not be repeated here.

[0145] Step S203, mapping the S server node location parameters to routing locations on the hash ring, and determining the routing locations mapped by the S server node location parameters as server routing locations of the S message servers on the hash ring respectively;

[0146] Step S204, obtaining an update message task, performing hash ring routing processing on the message identifier corresponding to the update message task, and obtaining a message routing position of the update message task on the hash ring;

[0147] The specific process of the terminal device performing hash ring routing processing on the message identifier corresponding to the update message task can be found in the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0148] Step S205, match the message routing position with the server routing positions corresponding to the S message servers, determine the target server routing position that matches the message routing position among the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task.

[0149] For easier understanding, please refer to Figure 5a .like Figure 5a As shown, routing position 50a may be the routing position corresponding to position parameter 0, and routing position 50b may be the routing position corresponding to position parameter (hash ring parameter - 1). The position parameters may include message position parameters and service area position parameters. For example, when the hash ring parameter is equal to 2 32 When the routing position 50b can be (2 32 -1) The corresponding routing position.

[0150] like Figure 5a As shown, when the number of message servers increases (for example, message server 51d is added to the hash ring), relative to the original scenario, the target message server corresponding to the message routing position belonging to the routing range between the server routing position M1 and the server routing position corresponding to the message server 51d (i.e., routing range 50d) will be updated from message server 51b to message server 51d (for example, the message routing position belonging to the routing range 50d may include message routing position 52b, and the target message server corresponding to the message routing position 52b will be updated from message server 51b to message server 51d), while the message routing positions of the remaining message identifiers will not change, thereby only affecting part of the data on the hash ring.

[0151] Optional, such as Figure 5a As shown, when the number of message servers is reduced (for example, message server 51b is reduced on the hash ring), relative to the original scenario, the target message server corresponding to the message routing position belonging to the routing range between server routing position M1 and server routing position M2 will be updated from message server 51b to message server 51c (for example, the message routing position belonging to the routing range between server routing position M1 and server routing position M2 may include message routing position 52b, and the target message server corresponding to message routing position 52b will be updated from message server 51b to message server 51c), while the message routing positions of the remaining message identifiers will not change, thereby only affecting part of the data on the hash ring.

[0152] It can be seen that the embodiment of the present application can perform hash ring routing processing on the message identifier corresponding to the update message task through a consistent hashing algorithm, and perform hash ring routing processing on the server node hash identifiers corresponding to the S message servers, to obtain the message routing position of the update message task on the hash ring and the server routing positions of the S message servers on the hash ring. Among them, one message server can correspond to one server routing position. Furthermore, the message routing position of the update message task on the hash ring and the server routing positions of the S message servers on the hash ring can be used to determine the target message server, thereby stabilizing the routing message identifier, ensuring that message tasks with the same message identifier and service type can be routed to the same message server, and then realizing the delayed merging mechanism of the message queue, ensuring that when the message servers are increased or decreased, the impact of data confusion caused by message identifier routing is minimized.

[0153] For further information, see Figure 8 , Figure 8 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a message server, or by a terminal device, or by both a message server and a terminal device. The message server can be the above-mentioned Figure 2 The message server 20a in the corresponding embodiment, the terminal device can be the above Figure 2 The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the terminal device as an example for explanation. Among them, the data processing method may include the following steps S301-S307:

[0154] Step S301: Message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier;

[0155] Specifically, the terminal device may obtain an identifier extension string for performing identifier extension processing. j (i.e., message server P j belongs to S message servers), where j can be a positive integer less than or equal to S. Further, the terminal device can j The corresponding server node identifier and identifier extension string are concatenated to obtain the message server P j The corresponding server virtual ID.

[0156] It should be understood that the embodiment of the present application does not limit the string type of the identification extension string. Different identification extension strings can expand the server node identification into different server virtual identifications, thereby increasing the diversity of server virtual identifications. For example, the identification extension string can be "#1", "#2", or "-1". Among them, when the identification extension string is "#1" and the server node identification is "ABCD", the server virtual identification can be "ABCD#1"; when the identification extension string is "-1" and the server node identification is "ABCD", the server virtual identification can be "ABCD-1".

[0157] Optionally, the terminal device can send a j The corresponding server node identification is used to extract identification features and obtain the message server P j The terminal device can further input the node identification feature into the identification extension model, perform feature extension on the node identification feature through the identification extension model, and obtain the identification extension feature corresponding to the node identification feature. Further, the terminal device can decode the identification extension feature to generate the message server P j The corresponding server virtual ID.

[0158] Among them, the terminal device sends a j The specific process of extracting the identification features of the corresponding server node identification can be described as follows: the terminal device can j The corresponding server node identifier is segmented to obtain the message server P j The segment identifier of the corresponding server node identifier. For example, when the server node identifier is "ABCD", the segment identifier of the server node identifier can be "A", "B", "C" and "D"; for another example, when the server node identifier is "ABCD", the segment identifier of the server node identifier can be "A.", "B.", "C." and "D". Further, the terminal device can perform feature conversion on the segment identifier to obtain the segment feature corresponding to the segment identifier. Further, the terminal device can determine the segment identifier in the message server P j The terminal device can further perform feature fusion on the segment feature and the location feature (i.e., perform feature fusion on the segment feature and the location feature corresponding to the same segment feature) to obtain the message server P j The node identification feature of the corresponding server node identification.

[0159] The terminal device can decode the identification extension feature to obtain a decoding identifier corresponding to the identification extension feature, and then concatenate the decoding identifiers corresponding to the identification extension feature to generate a message server P j The corresponding server virtual identifier. For example, when the decoded identifiers are "A.", "C.", "D.", "E.", and "@", the server virtual identifier may be "ACDE@".

[0160] Among them, the terminal device can perform feature conversion on the segmentation identifier through a word embedding algorithm (for example, Word2Vec (i.e., word to vector), Glove algorithm) to obtain the segmentation feature corresponding to the segmentation identifier; the terminal device can perform position encoding on the identifier position through a position formula to obtain the position feature corresponding to the identifier position. It should be understood that the embodiment of the present application does not limit the specific implementation method of feature conversion and position encoding.

[0161] It should be understood that by obtaining the segmentation features corresponding to the segmentation identifier, obtaining the position features corresponding to the segmentation identifier, and fusing the segmentation features and the position features, the accuracy of the acquired node identification features can be improved. In addition, the embodiment of the present application does not limit the specific method of feature fusion. For example, the feature fusion method can be a weighted summation method, a maximum value method, or a minimum value method.

[0162] Among them, the scheme provided in the embodiment of the present application mainly involves the machine learning (ML) technology and natural language processing (NLP) technology of artificial intelligence. Through the machine learning technology and natural language processing technology, the server node identification can be processed for identification extension to obtain the server virtual identification, thereby intelligently generating the server virtual identification, while ensuring the rationality of the server virtual identification, and improving the efficiency of generating the server virtual identification. Among them, the machine learning technology and natural language processing technology can be applied to the identification extension model in the embodiment of the present application.

[0163] It can be understood that the identification extension model is generated by iterative training of the initial identification extension model. The embodiment of the present application does not limit the model type of the identification extension model. For example, the identification extension model can be a bidirectional encoder representation from transformers (Bidirectional Encoder Representations from Transformers, BERT) model, or a robustly optimized BERT pre-training method (A Robustly Optimized BERT Pre-training Approach, referred to as RoBERTa).

[0164] Step S302: Send the message server P j The corresponding server node identifier and message server P j The corresponding server virtual identifier is determined to be the message server P j The corresponding server ID;

[0165] Among them, one message server can correspond to one server node identifier, and one message server can correspond to one or more server virtual identifiers. Therefore, one message server can correspond to multiple server identifiers.

[0166] Step S303: Message server P j The corresponding server ID is hashed to obtain the message server P j The corresponding server hash identifier;

[0167] In other words, the terminal device can send a j The corresponding server node identifier is hashed to obtain the message server P j The corresponding server node hash identifier; the terminal device can j The corresponding server virtual identifier is hashed to obtain the message server P j The corresponding server virtual hash identifier. Further, the terminal device can j The corresponding server node hash identifier and message server P j The corresponding server virtual hash identifier is determined to be the message server P j The corresponding server hash ID.

[0168] Among them, a message server can correspond to a server node hash identifier, that is, a server node identifier can be used to generate a server node hash identifier; a message server can correspond to one or more server virtual hash identifiers, that is, a service virtual identifier can be used to generate a server virtual hash identifier. j The specific process of performing hash calculation on the corresponding server identifier can be found in the above description of performing hash calculation on the message identifier corresponding to the update message task, which will not be repeated here.

[0169] Step S304: Send the message server P j The corresponding server hash identifier is modulo the hash ring parameter to obtain the message server P j The corresponding server location parameters;

[0170] In other words, the terminal device can send the message server P jThe corresponding server node hash identifier is modulo the hash ring parameter to obtain the message server P j Corresponding server node location parameters; the terminal device can send the message server P j The corresponding server virtual hash identifier is modulo the hash ring parameter to obtain the message server P j The corresponding server virtual location parameter. The hash ring parameter is equal to the number of routing locations on the hash ring. Further, the terminal device can j The corresponding server node location parameters and message server P j The corresponding server virtual location parameter is determined as the message server P j The corresponding server location parameter.

[0171] Among them, a message server can correspond to a server node location parameter, that is, a server node hash identifier can correspond to a server node location parameter; a message server can correspond to one or more server virtual location parameters, and a server virtual hash identifier can correspond to a server virtual location parameter. j The specific process of performing modulo processing on the corresponding server hash identifier and the hash ring parameter can be found in the above description of performing modulo processing on the message hash identifier and the hash ring parameter, which will not be repeated here.

[0172] Step S305: Send the message server P j The corresponding server location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server location parameter is determined as the message server P j The server routing position on the hash ring;

[0173] In other words, the terminal device can send the message server P j The corresponding server node location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server node location parameter is determined as the message server P j The server node routing position on the hash ring; the terminal device can send the message server P j The corresponding server virtual location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server virtual location parameter is determined as the message server P j The virtual routing position of the server on the hash ring. Further, the terminal device can j Server node routing position and message server P on the hash ringj The server virtual routing position on the hash ring is determined as the message server P j The server routing position on the hash ring.

[0174] Step S306, obtaining an update message task, performing hash ring routing processing on the message identifier corresponding to the update message task, and obtaining a message routing position of the update message task on the hash ring;

[0175] The specific process of the terminal device performing hash ring routing processing on the message identifier corresponding to the update message task can be found in the above Figure 3 The description of step S101 in the corresponding embodiment will not be repeated here.

[0176] Step S307, match the message routing position with the server routing positions corresponding to the S message servers, determine the target server routing position that matches the message routing position among the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task.

[0177] Among them, the message server P j The corresponding server routing location includes the message server P j The server node routing position determined by the corresponding server node identifier and the message server P j The server virtual routing position determined by the corresponding server virtual identifier; the message server P j The corresponding server node routing location is used to point to the message server P j The corresponding real node (i.e., real node, also called hash ring real node), message server P j The corresponding server virtual routing location is used to point to the message server P j It should be understood that the specific process of the terminal device determining the message server corresponding to the routing position of the target server as the target message server can be described as follows: when the routing position of the target server belongs to the message server P j When the corresponding server virtual routing position is determined, the terminal device can determine the virtual node corresponding to the target server routing position. Among them, the virtual node corresponding to the target server routing position belongs to the message server P j Furthermore, the terminal device can map the virtual node corresponding to the routing location of the target server to the message server P jThe corresponding real node is determined as the real node corresponding to the routing position of the target server. Further, the terminal device can determine the real node corresponding to the routing position of the target server according to the real node corresponding to the routing position of the target server. j Determine the target message server corresponding to the update message task.

[0178] Optionally, the target server routing location is the message server P j When the corresponding server node routing location is reached, the terminal device can send the message server P j The corresponding real node is determined as the real node corresponding to the routing position of the target server. Further, the terminal device can determine the real node corresponding to the routing position of the target server according to the real node corresponding to the routing position of the target server. j Determine the target message server corresponding to the update message task.

[0179] For easier understanding, please refer to Figure 5b .like Figure 5b As shown, routing position 53a may be the routing position corresponding to position parameter 0, and routing position 53b may be the routing position corresponding to position parameter (hash ring parameter - 1). The position parameters may include message position parameters and service area position parameters. For example, when the hash ring parameter is equal to 2 32 When the routing position 53b can be (2 32 -1) The corresponding routing position.

[0180] For ease of understanding, here we take one message server corresponding to two server virtual routing positions as an example for explanation. Among them, server routing position M2 can be the server node routing position corresponding to message server 54a, server routing position M4 and server routing position M6 can be the server virtual routing positions corresponding to message server 54a, that is, server routing position M4 and server routing position M6 are used to point to the virtual node corresponding to message server 54a, among which the virtual node corresponding to message server 54a can be called message server 56a and message server 55b; server routing position M5 can be the server node routing position corresponding to message server 54b, server routing position M7 and server routing position M9 can be the server virtual routing positions corresponding to message server 54b, that is Server routing position M7 and server routing position M9 are used to point to the virtual nodes corresponding to message server 54b, wherein the virtual nodes corresponding to message server 54b can be referred to as message server 56b and message server 55c; server routing position M8 can be the server node routing position corresponding to message server 54c, server routing position M1 and server routing position M3 can be the server virtual routing positions corresponding to message server 54c, that is, server routing position M1 and server routing position M3 are used to point to the virtual nodes corresponding to message server 54c, wherein the virtual nodes corresponding to message server 54c can be referred to as message server 56c and message server 55a.

[0181] like Figure 5b As shown, when the number of message servers increases (for example, adding message server 54d to the hash ring), relative to the original scenario, the target message server corresponding to the message routing position belonging to the routing range (i.e., routing range 53d) between the server routing position M1 and the server routing position corresponding to message server 54d (i.e., the server node routing position) will be updated from message server 54a to message server 54d (for example, the message routing position belonging to routing range 53d may include message routing position 57a, and the target message server corresponding to message routing position 57a ​​will be updated from message server 54a to message server 54d), while the message routing positions of the remaining message identifiers will not change, thereby only affecting part of the data on the hash ring. Optionally, while adding the server node routing position corresponding to message server 54d to the hash ring, the server virtual routing position corresponding to message server 54d can be added to the hash ring. The impact of adding the server virtual routing position corresponding to message server 54d can be found in the above description of adding the server node routing position corresponding to message server 54d, which will not be repeated here.

[0182] Optional, such as Figure 5bAs shown, in the case where the number of message servers is reduced (for example, message server 54a is reduced on the hash ring), relative to the original scenario, the target message server corresponding to the message routing position belonging to the routing range between server routing position M1 and server routing position M2 will be updated from message server 54a to message server 55a (for example, the message routing position belonging to the routing range between server routing position M1 and server routing position M2 may include message routing position 57a, and the target message server corresponding to message routing position 57a ​​will be updated from message server 54a to message server 55a), while the message routing positions of the remaining message identifiers will not change, thereby only affecting part of the data on the hash ring. Optionally, while reducing the server node routing position corresponding to message server 54a on the hash ring, the server virtual routing position (i.e., server routing position M4 and server routing position M6) corresponding to message server 54a can be reduced on the hash ring. The impact of reducing the server virtual routing position corresponding to message server 54a can refer to the above description of reducing the server node routing position corresponding to message server 54a, which will not be repeated here.

[0183] It should be understood that the terminal device can deploy tens of thousands of virtual nodes for each message server, and tens of thousands of virtual nodes and real nodes can be evenly distributed on the hash ring, which is equivalent to deploying a large number of message servers on the hash ring. At this time, by creating a large number of hash ring virtual nodes, the increase or decrease of a single message server will minimize the impact on the routing of the message identifier, thereby ensuring that the delayed merging mechanism of the message queue can operate normally, and solve the problem of data skew, and achieve load balancing (that is, evenly distribute message tasks to S message servers).

[0184] It can be seen that the embodiment of the present application can perform hash ring routing processing on the message identifier corresponding to the update message task through a consistent hashing algorithm, and perform hash ring routing processing on the server node hash identifiers corresponding to the S message servers, to obtain the message routing position of the update message task on the hash ring and the server routing positions of the S message servers on the hash ring. Among them, one message server can correspond to multiple server routing positions. Furthermore, the message routing position of the update message task on the hash ring and the server routing positions of the S message servers on the hash ring can be used to determine the target message server, thereby stabilizing the routing message identifier, ensuring that message tasks with the same message identifier and service type can be routed to the same message server, and then realizing the delayed merging mechanism of the message queue, ensuring that when the message servers are increased or decreased, the impact of data confusion caused by message identifier routing is minimized.

[0185] For further information, see Fig. 9, Fig. 9 This is a flow chart of a data processing method provided by an embodiment of the present application. The method can be executed by a message server, or by a terminal device, or by both a message server and a terminal device. The message server can be the above-mentioned Figure 2 The message server 20a in the corresponding embodiment, the terminal device can be the above Figure 2 The terminal device 20b of the corresponding embodiment. For ease of understanding, the embodiment of the present application takes the method executed by the message server as an example for explanation. Among them, the message server 20a can be the target message server, and the data processing method can include the following steps S401-step S403:

[0186] Step S401, receiving an update message task sent by a terminal device based on a target server routing location;

[0187] The target server routing position is a server routing position that matches the message routing position in the server routing positions corresponding to the S message servers, determined by the terminal device after matching the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on the hash ring. Here, S can be a positive integer; the target server routing position refers to the server routing position corresponding to the target message server, wherein the target server routing position can refer to the server node routing position corresponding to the target message server, or can refer to the server virtual routing position corresponding to the target message server.

[0188] Step S402, determining a target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces respectively;

[0189] Specifically, the target message server can obtain the command identifier (cmdid) in the update message task, and determine the message queue corresponding to the command identifier in the message queues corresponding to the N logical interfaces. Here, N can be a positive integer. In other words, the update message task actually packages the background logical interface, and the command identifier in the update message task will refer to the update message task having a background interface (i.e., logical interface) among the N logical interfaces to execute. Furthermore, the target message server can determine the message queue corresponding to the command identifier as the target message queue corresponding to the update message task. Among them, the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue, and different logical interfaces can be used to implement different functions (i.e., provide different services), so that the update message task is accurately assigned to the target message queue through the command identifier.

[0190] It should be understood that the command identifiers of multiple message tasks corresponding to the same call chain can be the same or different. Therefore, the multiple message tasks corresponding to the same call chain can be assigned to the same message queue or to different message queues, that is, the target message queues corresponding to the multiple message tasks corresponding to the same call chain can be the same or different.

[0191] Among them, in order to ensure the load balancing of the target message server, one message queue in the target message server can be used to process the same command identifier set, N message queues can be used to process different command identifier sets respectively, and the command identifiers of multiple message tasks corresponding to the same message queue can be the same or different. For example, here, N is equal to 2 as an example for explanation, and the N message queues can include message queue X1 and message queue X2. Message queue X1 can be used to process the command identifier set {1,2}, and message queue X2 can be used to process the command identifier set {3,4}. In this way, when the command identifier in the update message task is equal to 1, the target message server can determine message queue X1 as the message queue corresponding to the command identifier; in this way, when the command identifier in the update message task is equal to 3, the target message server can determine message queue X2 as the message queue corresponding to the command identifier.

[0192] Step S403: when there is a target message task in the target message queue, the update message task is discarded.

[0193] The update message task and the target message task can be the same message task. In other words, when there is a message task that is the same as the update message task in the target message queue, the target message server can discard the update message task, that is, discard the new task (that is, the update message task) and keep the old task (that is, the target message task), so as to ensure that the same message task is executed only once within the delay time (that is, the maximum delay time).

[0194] For easier understanding, see Fig.10a , Fig.10a Schematic diagram of a scenario of discarding an update message task provided by an embodiment of the present application. Fig.10aThe message queue 100a shown may be a target message queue in a target message server, and the message queue 100a may include but is not limited to tasks 104a, 104b, and 104c. The task identifier of task 104a may be task identifier 101a, the message identifier of task 104a may be message identifier 102a, and the command identifier of task 104a may be command identifier 103a; the task identifier of task 104b may be task identifier 101b, the message identifier of task 104b may be message identifier 102b, and the command identifier of task 104b may be command identifier 103b; the task identifier of task 104c may be task identifier 101c, the message identifier of task 104c may be message identifier 102c, and the command identifier of task 104c may be command identifier 103c.

[0195] like Fig.10a As shown, the target message server can receive the update message task sent by the terminal device, the task identifier of the update message task can be task identifier 101a, the message identifier of the update message task can be message 102a, and the command identifier of the update message task can be command identifier 103a. At this time, there is a message task (i.e., task 104a) identical to the update message task in the message queue 100a, and the target message server can discard the update message task.

[0196] Optionally, when there is no message task identical to the update message task in the target message queue, the target message server can add the update message task to the target message queue (i.e., the update message task is queued), and record the message queue time when the update message task is added to the target message queue. Further, the target message server can obtain the time interval between the message queue time and the current time (i.e., the queue time, which can also be referred to as the time of delaying waiting for dequeue execution), and discard the update message task in the target message queue when the time interval is greater than or equal to the maximum delay time. In other words, the target message server can determine that the update message task has not been executed when the queue time of the update message task exceeds the maximum delay time, and then discard the update message task in the target message queue, so that the target message queue will not cause obstruction. Wherein, the embodiment of the present application does not limit the duration of the maximum delay time, for example, the duration of the maximum delay time can be 10 minutes.

[0197] Optionally, when the delayed waiting time for dequeuing execution (ie, time interval) is less than the maximum delay time and the update message task is dequeued, the delay time of the update message task ends, ie, the calculation of the time interval for the update message task ends.

[0198] For easier understanding, see Fig.10b , Fig.10bSchematic diagram of a scenario of adding and updating message tasks provided by an embodiment of the present application. Fig.10b The message queue 100a shown may be the above Fig.10a The message queue 100a in the corresponding embodiment may include but is not limited to tasks 104a, 104b and 104c.

[0199] like Fig.10b As shown, the target message server can receive the update message task sent by the terminal device, the task identifier of the update message task can be task identifier 101d, the message identifier of the update message task can be message 102d, and the command identifier of the update message task can be command identifier 103d. At this time, there is no message task identical to the update message task in the message queue 100a, and the target message server can add the update message task to the message queue 100a to obtain the message queue 100b.

[0200] In an embodiment of the present application, the target message server can receive the update message task sent by the terminal device based on the routing position of the target server, determine the target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces, and then discard the update message task when there is a target message task identical to the update message task in the target message queue. It can be understood that the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the routing position of the target server is determined by the terminal device after matching the message routing position with the server routing positions corresponding to the S message servers, and the server routing position that matches the message routing position is determined in the server routing positions corresponding to the S message servers, and the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on the hash ring. It can be seen that since the same update message task and target message task can correspond to the same message routing location and service type, the same update message task and target message task can be sent to the same message queue (i.e., target message queue) in the same message server (i.e., target message server), reducing the possibility of the same message task (i.e., target message task and update message task) being repeatedly executed by different message servers, thereby reducing the possibility of errors in the terminal device's business.

[0201] For further information, see Fig.11 , Fig.11 It is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 1 may include: a position determination module 11, a position matching module 12, and a task sending module 13;

[0202] The position determination module 11 is used to determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message tasks on the hash ring; S is a positive integer;

[0203] The location determination module 11 includes: a first processing unit 111 and a second processing unit 112;

[0204] The first processing unit 111 is used to perform hash ring routing processing on the server node identifiers corresponding to the S message servers respectively, to obtain the server routing positions of the S message servers respectively on the hash ring;

[0205] The first processing unit 111 is specifically configured to perform hash calculations on the server node identifiers corresponding to the S message servers to obtain the server node hash identifiers corresponding to the S message servers.

[0206] The first processing unit 111 is specifically used to perform modulo processing on each server node hash identifier of the S server node hash identifiers and a hash ring parameter to obtain server node position parameters corresponding to the S server node hash identifiers respectively; the hash ring parameter is equal to the number of routing positions on the hash ring;

[0207] The first processing unit 111 is specifically configured to map the S server node location parameters to routing positions on the hash ring, and determine the routing positions mapped by the S server node location parameters as server routing positions of the S message servers on the hash ring respectively.

[0208] Among them, the S message servers include message server P j , j is a positive integer less than or equal to S;

[0209] The first processing unit 111 is specifically configured to process the message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier;

[0210] The first processing unit 111 is specifically configured to send the message server P j The corresponding server node identifier and message server P j The corresponding server virtual identifier is determined to be the message server P j The corresponding server ID;

[0211] The first processing unit 111 is specifically configured to process the message server P j The corresponding server ID is hashed to obtain the message server P j The corresponding server hash identifier;

[0212] The first processing unit 111 is specifically configured to send the message server P j The corresponding server hash identifier is modulo the hash ring parameter to obtain the message server P j The corresponding server location parameter; the hash ring parameter is equal to the number of routing locations on the hash ring;

[0213] The first processing unit 111 is specifically configured to send the message server P j The corresponding server location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server location parameter is determined as the message server P j The server routing position on the hash ring.

[0214] The first processing unit 111 is specifically used to obtain an identifier extension character string for performing identifier extension processing;

[0215] The first processing unit 111 is specifically configured to process the message server P j The corresponding server node identifier and identifier extension string are concatenated to obtain the message server P j The corresponding server virtual ID.

[0216] The first processing unit 111 is specifically configured to process the message server P j The corresponding server node identification is used to extract identification features and obtain the message server P j a node identification feature of the corresponding server node identification;

[0217] The first processing unit 111 is specifically configured to input the node identification feature into the identification extension model, perform feature extension on the node identification feature through the identification extension model, and obtain an identification extension feature corresponding to the node identification feature;

[0218] The first processing unit 111 is specifically configured to decode the identification feature of the identification extension feature and generate a message server P j The corresponding server virtual ID.

[0219] The first processing unit 111 is specifically configured to process the message server P j The corresponding server node identifier is segmented to obtain the message server P j The segment identifier of the corresponding server node identifier;

[0220] The first processing unit 111 is specifically used to perform feature conversion on the segment identifier to obtain the segment feature corresponding to the segment identifier;

[0221] The first processing unit 111 is specifically configured to determine the segment identifier in the message server P jThe identification position in the corresponding server node identification is position-encoded to obtain the position feature corresponding to the identification position;

[0222] The first processing unit 111 is specifically used to fuse the segment features and the location features to obtain the message server P j The node identification feature of the corresponding server node identification.

[0223] The second processing unit 112 is used to obtain the update message task, perform hash ring routing processing on the message identifier corresponding to the update message task, and obtain the message routing position of the update message task on the hash ring.

[0224] The second processing unit 112 is specifically configured to perform a hash calculation on the message identifier corresponding to the update message task to obtain a message hash identifier corresponding to the update message task;

[0225] The second processing unit 112 is specifically used to perform modulo processing on the message hash identifier and the hash ring parameter to obtain a message position parameter corresponding to the message hash identifier; the hash ring parameter is equal to the number of routing positions on the hash ring;

[0226] The second processing unit 112 is specifically configured to map the message position parameter to a routing position on the hash ring, and determine the routing position mapped by the message position parameter as the message routing position of the update message task on the hash ring.

[0227] The specific implementation of the first processing unit 111 and the second processing unit 112 can be found in the above Figure 3 In the corresponding embodiment, steps S101, Figure 7 In the corresponding embodiment, steps S201 to S204, and Figure 8 The description of steps S301 to S306 in the corresponding embodiment will not be repeated here.

[0228] The position matching module 12 is used to match the message routing position with the server routing positions corresponding to the S message servers, determine the target server routing position that matches the message routing position among the server routing positions corresponding to the S message servers, and determine the message server corresponding to the target server routing position as the target message server corresponding to the update message task; the target message server includes message queues corresponding to N logical interfaces, respectively; N is a positive integer;

[0229] The position matching module 12 includes: a range determination unit 121, a range matching unit 122, and a position determination unit 123;

[0230] A range determination unit 121, configured to determine, on a hash ring, server routing ranges corresponding to the S message servers, respectively, according to the server routing positions corresponding to the S message servers, respectively;

[0231] The server routing locations corresponding to the S message servers include the server routing location M i , i is a positive integer less than or equal to K; K is equal to the total number of server routing positions corresponding to the S message servers; the K server routing positions are distributed in sequence along the routing direction on the hash ring;

[0232] The range determination unit 121 is specifically configured to determine the range of the server routing location M. i When it is the first server routing position among the K server routing positions, in the routing direction of the hash ring, it will be connected from the server routing position M K To server routing location M i The routing range between is determined as the server routing location M i Corresponding server routing range; server routing location M K is the last server routing position among the K server routing positions;

[0233] The range determination unit 121 is specifically configured to determine the range of the server routing location M. i If it is not the first server routing position among the K server routing positions, in the routing direction of the hash ring, it will be forwarded from the server routing position M i-1 To server routing location M i The routing range between is determined as the server routing location M i Corresponding server routing range; server routing location M i-1 is the server routing position M among the K server routing positions i The previous server routing location of .

[0234] A range matching unit 122 is used to perform range matching between the message routing position and the server routing ranges corresponding to the S message servers, and determine the server routing range to which the message routing position belongs in the server routing ranges corresponding to the S message servers;

[0235] The location determination unit 123 is used to determine the server routing location corresponding to the server routing range to which the message routing location belongs as the target server routing location that matches the message routing location.

[0236] The specific implementation of the range determination unit 121, the range matching unit 122 and the position determination unit 123 can be found in the above Figure 3 In the corresponding embodiment, steps S102, Figure 7In the corresponding embodiment, step S205 and Figure 8 The description of step S307 in the corresponding embodiment will not be repeated here.

[0237] Among them, the message server P j The corresponding server routing location includes the message server P j The server node routing position determined by the corresponding server node identifier and the message server P j The server virtual routing position determined by the corresponding server virtual identifier; the message server P j The corresponding server node routing location is used to point to the message server P j Corresponding real node; message server P j The corresponding server virtual routing location is used to point to the message server P j The corresponding virtual node;

[0238] The location matching module 12 is specifically used to find that the routing location of the target server belongs to the message server P j When the virtual routing position of the corresponding server is determined, the virtual node corresponding to the routing position of the target server is determined; the virtual node corresponding to the routing position of the target server belongs to the message server P j The corresponding virtual node;

[0239] The location matching module 12 is specifically used to map the virtual nodes corresponding to the routing location of the target server, and map the message server P j The corresponding real node is determined to be the real node corresponding to the routing location of the target server;

[0240] The location matching module 12 is specifically used to match the message server P to the real node corresponding to the routing location of the target server. j Determine the target message server corresponding to the update message task.

[0241] The task sending module 13 is used to send the update message task to the target message server; the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task among N message queues; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when the target message task exists in the target message queue; the update message task and the target message task are the same message task.

[0242] The specific implementation of the location determination module 11, the location matching module 12 and the task sending module 13 can be found in the above Figure 3 In the corresponding embodiment, steps S101 to S103, Figure 7 In the corresponding embodiment, steps S201 to S205, and Figure 8 The description of steps S301 to S307 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0243] For further information, see Fig.12 , Fig.12 is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 2 may include: a task receiving module 21, a queue determining module 22, and a task discarding module 23; further, the data processing device 2 may also include: a task adding module 24;

[0244] The task receiving module 21 is used to receive the update message task sent by the terminal device based on the target server routing position; the target server routing position is a server routing position that matches the message routing position determined by the terminal device in the server routing positions corresponding to the S message servers after the terminal device matches the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on the hash ring; S is a positive integer; the target server routing position refers to the server routing position corresponding to the target message server;

[0245] The queue determination module 22 is used to determine the target message queue corresponding to the update message task from the message queues corresponding to the N logical interfaces respectively; N is a positive integer; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue;

[0246] The queue determination module 22 is specifically used to obtain the command identifier in the update message task, and determine the message queue corresponding to the command identifier in the message queues corresponding to the N logical interfaces respectively;

[0247] The queue determination module 22 is specifically configured to determine the message queue corresponding to the command identifier as the target message queue corresponding to the update message task.

[0248] The task discarding module 23 is used to discard the update message task when there is a target message task in the target message queue; the update message task and the target message task are the same message tasks.

[0249] Optionally, a task adding module 24 is used to add the update message task to the target message queue when there is no message task identical to the update message task in the target message queue, and record the message entry time when the update message task is added to the target message queue;

[0250] The task adding module 24 is used to obtain the time interval between the message entry time and the current time, and when the time interval is greater than or equal to the maximum delay time, discard the update message task in the target message queue.

[0251] The specific implementation of the task receiving module 21, the queue determining module 22, the task discarding module 23 and the task adding module 24 can be found in the above Fig. 9 The description of steps S401 to S403 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0252] For further information, see Fig.13 , Fig.13 Schematic diagram of a computer device provided in an embodiment of the present application, the computer device may be a terminal device or a message server. Fig.13 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As Fig.13 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0253] In such Fig.13 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005.

[0254] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 , Figure 7 , Figure 8 and Fig. 9The description of the data processing method in the corresponding embodiment can also be performed as described above. Fig.11 In the corresponding embodiment, the data processing device 1 and Fig.12 The description of the data processing device 2 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0255] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the data processing device 1 and the data processing device 2 mentioned above. When the processor executes the computer program, it can execute the above-mentioned Figure 3 , Figure 7 , Figure 8 and Fig. 9 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0256] In addition, it should be noted that: the embodiment of the present application also provides a computer program product, which may include a computer program, and the computer program may be stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor may execute the computer program, so that the computer device performs the above Figure 3 , Figure 7 , Figure 8 and Fig. 9 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0257] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0258] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, It is characterized in that include: Determine the server routing positions corresponding to the S message servers and the message routing positions corresponding to the update message tasks on the hash ring; Said S is a positive integer; Matching the message routing position with the server routing positions corresponding to the S message servers, determining a target server routing position that matches the message routing position among the server routing positions corresponding to the S message servers, and determining the message server corresponding to the target server routing position as the target message server corresponding to the update message task; The target message server includes message queues corresponding to N logical interfaces respectively; N is a positive integer; The update message task is sent to the target message server; the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task among the N message queues; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when there is a target message task in the target message queue; the update message task and the target message task are the same message task.

2. The method according to claim 1, It is characterized in that The determining, on the hash ring, server routing positions corresponding to the S message servers and the message routing position corresponding to the update message task respectively comprises: Performing hash ring routing processing on the server node identifiers corresponding to the S message servers respectively, to obtain the server routing positions of the S message servers respectively on the hash ring; An update message task is acquired, and a hash ring routing process is performed on a message identifier corresponding to the update message task to obtain a message routing position of the update message task on the hash ring.

3. The method according to claim 2, It is characterized in that The performing hash ring routing processing on the server node identifiers corresponding to the S message servers to obtain the server routing positions of the S message servers on the hash ring respectively includes: Performing hash calculation on the server node identifiers corresponding to the S message servers respectively, to obtain the server node hash identifiers corresponding to the S message servers respectively; Perform modulo processing on each server node hash identifier of the S server node hash identifiers and a hash ring parameter to obtain server node position parameters corresponding to the S server node hash identifiers; the hash ring parameter is equal to the number of routing positions on the hash ring; The S server node location parameters are mapped to routing positions on the hash ring, and the routing positions mapped to the S server node location parameters are determined as the server routing positions of the S message servers on the hash ring respectively.

4. The method according to claim 2, It is characterized in that The S message servers include a message server P j , j is a positive integer less than or equal to S; The performing hash ring routing processing on the server node identifiers corresponding to the S message servers to obtain the server routing positions of the S message servers on the hash ring respectively includes: The message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier; The message server P j The corresponding server node identifier and the message server P j The corresponding server virtual identifier is determined to be the message server P j The corresponding server ID; The message server P j The corresponding server identifier is hashed to obtain the message server P j The corresponding server hash identifier; The message server P j The corresponding server hash identifier is modulo the hash ring parameter to obtain the message server P j The corresponding server location parameter; the hash ring parameter is equal to the number of routing locations on the hash ring; The message server P j The corresponding server location parameters are mapped to the routing location on the hash ring, and the message server P j The routing location mapped by the corresponding server location parameter is determined as the message server P j The server routing position on the hash ring.

5. The method according to claim 2, It is characterized in that The performing hash ring routing processing on the message identifier corresponding to the update message task to obtain the message routing position of the update message task on the hash ring includes: Performing hash calculation on the message identifier corresponding to the update message task to obtain the message hash identifier corresponding to the update message task; Perform modulo processing on the message hash identifier and the hash ring parameter to obtain a message position parameter corresponding to the message hash identifier; the hash ring parameter is equal to the number of routing positions on the hash ring; The message position parameter is mapped to a routing position on the hash ring, and the routing position mapped to the message position parameter is determined as the message routing position of the update message task on the hash ring.

6. The method according to claim 1, It is characterized in that The step of matching the message routing position with the server routing positions respectively corresponding to the S message servers, and determining the target server routing position matching the message routing position among the server routing positions respectively corresponding to the S message servers, comprises: Determine, on the hash ring, server routing ranges corresponding to the S message servers, respectively, according to the server routing positions corresponding to the S message servers, respectively; Perform range matching on the message routing position and the server routing ranges respectively corresponding to the S message servers, and determine the server routing range to which the message routing position belongs in the server routing ranges respectively corresponding to the S message servers; The server routing location corresponding to the server routing range to which the message routing location belongs is determined as the target server routing location that matches the message routing location.

7. The method according to claim 6, It is characterized in that The server routing locations corresponding to the S message servers include a server routing location M i , i is a positive integer less than or equal to K; K is equal to the total number of server routing positions corresponding to the S message servers; the K server routing positions are distributed in sequence along the routing direction on the hash ring; The determining, on the hash ring, server routing ranges corresponding to the S message servers respectively according to the server routing positions corresponding to the S message servers respectively, comprises: At the server routing location M i When it is the first server routing position among the K server routing positions, in the routing direction of the hash ring, the server routing position M K Routing location M to the server i The routing range between is determined as the server routing location M i The corresponding server routing range; the server routing location M K is the last server routing location among the K server routing locations; At the server routing location M i When it is not the first server routing position among the K server routing positions, in the routing direction of the hash ring, the server routing position M i-1 Routing location M to the server i The routing range between is determined as the server routing location M i The corresponding server routing range; the server routing location M i-1 is the server routing position M among the K server routing positions i The previous server routing location of .

8. The method according to claim 4, It is characterized in that The message server P j The corresponding server routing location includes the message server P j The server node routing position determined by the corresponding server node identifier and the message server P j The server virtual routing position determined by the corresponding server virtual identifier; the message server P j The corresponding server node routing location is used to point to the message server P j The corresponding real node; The message server P j The corresponding server virtual routing location is used to point to the message server P j The corresponding virtual node; The step of determining the message server corresponding to the routing location of the target server as the target message server corresponding to the update message task includes: The target server routing location belongs to the message server P j When the virtual node corresponding to the routing position of the target server is determined, the virtual node corresponding to the routing position of the target server belongs to the message server P j The corresponding virtual node; Perform node mapping on the virtual node corresponding to the routing location of the target server, and map the message server P j The corresponding real node is determined to be the real node corresponding to the routing location of the target server; According to the real node corresponding to the routing location of the target server, the message server P j A target message server corresponding to the update message task is determined.

9. The method according to claim 4, It is characterized in that The message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier includes: Get the identifier extension string used for identifier extension processing; The message server P j The corresponding server node identifier and the identifier extension string are concatenated to obtain the message server P j The corresponding server virtual ID.

10. The method according to claim 4, It is characterized in that The message server P j The corresponding server node identifier is processed by identifier extension to obtain the message server P j The corresponding server virtual identifier includes: The message server P j The corresponding server node identification is used to extract identification features to obtain the message server P j a node identification feature of the corresponding server node identification; Inputting the node identification feature into an identification extension model, performing feature extension on the node identification feature through the identification extension model, and obtaining an identification extension feature corresponding to the node identification feature; Decode the identification feature of the identification extension feature to generate the message server P j The corresponding server virtual ID.

11. The method according to claim 10, It is characterized in that The message server P j The corresponding server node identification is used to extract identification features to obtain the message server P j The node identification features of the corresponding server node identification include: The message server P j The corresponding server node identification is processed in segments to obtain the message server P j The segment identifier of the corresponding server node identifier; Performing feature conversion on the segment identifier to obtain segment features corresponding to the segment identifier; Determine the segment identifier in the message server P j The identification position in the corresponding server node identification is position-encoded to obtain the position feature corresponding to the identification position; The segment features and the location features are fused to obtain the message server P j The node identification feature of the corresponding server node identification.

12. A data processing method, It is characterized in that The method is performed by a target message server and includes: A receiving terminal device sends an update message task based on a target server routing position; the target server routing position is a server routing position that matches the message routing position, determined by the terminal device in the server routing positions corresponding to the S message servers after matching the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on a hash ring; S is a positive integer; the target server routing position refers to the server routing position corresponding to the target message server; Determine a target message queue corresponding to the update message task in the message queues corresponding to N logical interfaces respectively; N is a positive integer; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; When there is a target message task in the target message queue, the update message task is discarded; the update message task and the target message task are the same message task.

13. The method according to claim 12, It is characterized in that The determining of the target message queue corresponding to the update message task in the message queues corresponding to the N logical interfaces respectively includes: Obtaining a command identifier in the update message task, and determining a message queue corresponding to the command identifier in the message queues corresponding to the N logical interfaces respectively; The message queue corresponding to the command identifier is determined as the target message queue corresponding to the update message task.

14. The method according to claim 12, It is characterized in that The method further comprises: When there is no message task identical to the update message task in the target message queue, add the update message task to the target message queue, and record the message entry time when the update message task is added to the target message queue; The time interval between the message entry time and the current time is obtained, and when the time interval is greater than or equal to the maximum delay time, the update message task in the target message queue is discarded.

15. A data processing device, It is characterized in that include: A location determination module, used to determine the server routing locations corresponding to the S message servers and the message routing locations corresponding to the update message tasks on the hash ring; Said S is a positive integer; a position matching module, used for matching the message routing position with the server routing positions corresponding to the S message servers, determining a target server routing position matching the message routing position among the server routing positions corresponding to the S message servers, and determining the message server corresponding to the target server routing position as the target message server corresponding to the update message task; The target message server includes message queues corresponding to N logical interfaces respectively; N is a positive integer; A task sending module, used to send the update message task to the target message server; the update message task is used to instruct the target message server to determine the target message queue corresponding to the update message task among the N message queues; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; the target message queue is used to instruct the target message server to discard the update message task when there is a target message task in the target message queue; the update message task and the target message task are the same message task.

16. A data processing device, It is characterized in that The device runs on a target message server and includes: A task receiving module, used for receiving an update message task sent by a terminal device based on a target server routing position; the target server routing position is a server routing position that matches the message routing position, determined by the terminal device among the server routing positions corresponding to the S message servers, after the terminal device matches the message routing position with the server routing positions corresponding to the S message servers; the message routing position and the server routing positions corresponding to the S message servers are determined by the terminal device on a hash ring; S is a positive integer; the target server routing position refers to the server routing position corresponding to the target message server; A queue determination module, used to determine a target message queue corresponding to the update message task from message queues corresponding to N logical interfaces respectively; N is a positive integer; the service type associated with the update message task is the same as the service type provided by the logical interface corresponding to the target message queue; The task discarding module is used to discard the update message task when there is a target message task in the target message queue; the update message task and the target message task are the same message task.

17. A computer device, It is characterized in that include: Processor and memory; The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 14.

18. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.

19. A computer program product, It is characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium and is suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.