CN116436855B - Data information processing method, device, electronic equipment and medium - Google Patents

Data information processing method, device, electronic equipment and medium Download PDF

Info

Publication number
CN116436855B
CN116436855B CN202310684497.2A CN202310684497A CN116436855B CN 116436855 B CN116436855 B CN 116436855B CN 202310684497 A CN202310684497 A CN 202310684497A CN 116436855 B CN116436855 B CN 116436855B
Authority
CN
China
Prior art keywords
processor
session information
information
client
data information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310684497.2A
Other languages
Chinese (zh)
Other versions
CN116436855A (en
Inventor
吴佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202310684497.2A priority Critical patent/CN116436855B/en
Publication of CN116436855A publication Critical patent/CN116436855A/en
Application granted granted Critical
Publication of CN116436855B publication Critical patent/CN116436855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a data information processing method, a device, equipment, a storage medium and a program product, relates to the technical field of computers, and can be applied to the technical field of finance. The method comprises the following steps: determining a first processor of the plurality of processors in response to receiving the data information from the client; determining a second processor of the plurality of processors by using a second algorithm under the condition that the matched session information matched with the client does not exist in the existing session information of the first processor and the first processor is a busy processor, wherein the second processor is a non-busy processor; respectively creating session information in a first processor and a second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and processing data information from the client based on the first session information and the second session information.

Description

Data information processing method, device, electronic equipment and medium
Technical Field
The present invention relates to the field of computer technology, and may be applied to the field of financial technology, and more particularly, to a data information processing method, apparatus, device, medium, and program product.
Background
A session: and information interaction processes, such as data transmission processes after the client and the server establish a link. This process starts from the establishment of a connection, during which a party may be involved in the transfer of information (e.g. network messages) several times, to the end of the disconnection. Session processing CPU: in a multi-core system, a plurality of cpus process messages simultaneously in parallel. But all messages in the same session are handed to the same CPU for processing. The session information is saved in the CPU-bound memory that handles the session.
The processing message is mainly divided into two links of message receiving and message sending, and the message processing on the multi-core platform can be divided into a plurality of cores to be independently processed at the same time. In some cases, there are more messages that need to be processed by some cores, and fewer messages that need to be processed by some cores. This situation may overload cores that handle more messages and cause packet loss while other cores are in idle state.
Disclosure of Invention
In view of the foregoing, the present invention provides a data information processing method, apparatus, device, medium, and program product for determining a first processor of a plurality of processors using a first algorithm in response to receiving data information from a client; judging whether the matched session information matched with the client exists in the existing session information of the first processor; determining a second processor of the plurality of processors by using a second algorithm under the condition that the matched session information matched with the client does not exist in the existing session information of the first processor and the first processor is a busy processor, wherein the second processor is a non-busy processor; respectively creating session information in a first processor and a second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and processing the data information from the client based on the first session information and the second session information, so that the data information from the client is processed by the second processor, and the second processor is a non-busy processor, thereby being beneficial to reducing the packet loss rate and enabling the load to be more uniform.
According to a first aspect of the present invention, there is provided a data information processing method comprising: determining a first processor of the plurality of processors using a first algorithm in response to receiving the data information from the client; wherein the data information includes first sub data information; judging whether the prior session information of the first processor has matched session information matched with the client; determining a second processor of the plurality of processors by a second algorithm, wherein the second processor is a non-busy processor, when the first processor is a busy processor and no matching session information matching the client exists in the existing session information of the first processor; respectively creating session information in the first processor and the second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and processing data information from the client based on the first session information and the second session information.
According to an embodiment of the present invention, the data information further includes second sub-data information, and the first session information characterizes: the data information from the client needs to be forwarded to the second processor; the second session information characterizes: the second algorithm calculates the data information from the client to obtain a calculation result, and a processor corresponding to the calculation result processes the data information from the client; the processing data information from the client based on the first session information and the second session information includes: determining the first processor by using the first algorithm in response to receiving second sub-data information from the client, and acquiring existing session information of the first processor; in response to acquiring the first session information, determining to forward second sub-data information from a client to a second processor according to the first session information, and acquiring existing session information of the second processor; and in response to acquiring the second session information, processing the second sub-data information by using the second processor under the condition that the processor corresponding to the calculation result is determined to be matched with the second processor according to the second session information.
According to an embodiment of the present invention, in a case where it is determined that there is matching session information matching the client in existing session information of the first processor, the method further includes: judging whether the matched session information is the first session information or not; and processing data information from the client according to the first session information under the condition that the matching session information is determined to be the first session information.
According to an embodiment of the present invention, in a case where it is determined that there is no matching session information matching the client in the existing session information of the first processor, the method further includes: in the event that the first processor is determined to be a less busy processor, data information from a client is processed with the first processor.
According to an embodiment of the present invention, the method further comprises: determining that the second session information meets the condition of session aging processing, sending a deleting instruction of the first session information to the first processor, and deleting the second session information; and the first processor deleting the first session information in response to receiving the deletion instruction.
According to an embodiment of the present invention, the method further comprises: and responding to the received session information inquiry request from the client, and acquiring a session information inquiry result based on the second processor.
A second aspect of the present invention provides a data information processing apparatus comprising: a first determining module for determining a first processor of the plurality of processors using a first algorithm in response to receiving data information from the client; wherein the data information includes first sub data information; the judging module is used for judging whether the matched session information matched with the client exists in the existing session information of the first processor; a second determining module, configured to determine, by using a second algorithm, a second processor among the plurality of processors, where the second processor is a non-busy processor, in a case where it is determined that there is no matching session information that matches the client in existing session information of the first processor, and where the first processor is a busy processor; the creation module is used for creating session information in the first processor and the second processor respectively to obtain first session information stored in the first processor and second session information stored in the second processor; and a processing module for processing data information from the client based on the first session information and the second session information.
A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the data information processing method described above.
The fourth aspect of the present invention also provides a computer-readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the above-described data information processing method.
The fifth aspect of the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-mentioned data information processing method.
The data information processing method provided by the embodiment determines a first processor of a plurality of processors by using a first algorithm in response to receiving data information from a client; judging whether the matched session information matched with the client exists in the existing session information of the first processor; determining a second processor of the plurality of processors by using a second algorithm under the condition that the matched session information matched with the client does not exist in the existing session information of the first processor and the first processor is a busy processor, wherein the second processor is a non-busy processor; respectively creating session information in a first processor and a second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and processing the data information from the client based on the first session information and the second session information, so that the data information from the client is processed by the second processor, and the second processor is a non-busy processor, thereby being beneficial to reducing the packet loss rate and enabling the load to be more uniform.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a data information processing method, apparatus, device, medium and program product according to an embodiment of the present invention;
FIG. 2 schematically shows a flow chart of a data information processing method according to an embodiment of the invention;
FIG. 3 schematically shows a flow chart of a data information processing method according to another embodiment of the invention;
fig. 4 schematically shows a block diagram of a data information processing apparatus according to an embodiment of the present invention; and
fig. 5 schematically shows a block diagram of an electronic device adapted to implement a data information processing method according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the invention provides a data information processing method and a data information processing device, which are used for determining a first processor in a plurality of processors by utilizing a first algorithm in response to receiving data information from a client; judging whether the matched session information matched with the client exists in the existing session information of the first processor; determining a second processor of the plurality of processors by using a second algorithm under the condition that the matched session information matched with the client does not exist in the existing session information of the first processor and the first processor is a busy processor, wherein the second processor is a non-busy processor; respectively creating session information in a first processor and a second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and processing data information from the client based on the first session information and the second session information.
Fig. 1 schematically illustrates an application scenario diagram of a data information processing method, apparatus, device, medium and program product according to an embodiment of the present invention.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data information processing method provided by the embodiment of the present invention may be generally executed by the server 105. Accordingly, the data information processing apparatus provided by the embodiment of the present invention may be generally provided in the server 105. The data information processing method provided by the embodiment of the present invention may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data information processing apparatus provided by the embodiment of the present invention may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The data information processing method of the disclosed embodiment will be described in detail below with reference to fig. 2 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a data information processing method according to an embodiment of the invention.
As shown in fig. 2, the embodiment includes operations S210 to S250, and the data information processing method may be executed by a server.
In the technical scheme of the invention, the processes of data acquisition, collection, storage, use, processing, transmission, provision, disclosure, application and the like all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In response to receiving data information from the client, a first processor of the plurality of processors is determined using a first algorithm, wherein the data information includes first sub-data information, in operation S210.
The first algorithm may be a default hash algorithm configured for the data information. The processor that processes the data information may be calculated using the default hash algorithm and handed over to the processor for processing. Such as a first processor.
In operation S220, it is determined whether there is matching session information matching the client among the existing session information of the first processor.
The session information of each processor characterizes certain data information from certain clients processed by the processor. Matching session information refers to the first processor having processed certain data information from the client.
In operation S230, in case it is determined that there is no matching session information matching the client among the existing session information of the first processor, and in case the first processor is a busy processor, a second processor among the plurality of processors is determined using a second algorithm, the second processor being a non-busy processor.
It will be appreciated that the second algorithm is invoked if it is determined that there is no matching session information in the existing session information of the first processor that matches the client, and if the first processor is a busy processor.
It should be noted that, for both busy and non-busy processors, each CPU and core utilization may be monitored to determine the busy and non-busy processors. For example, if a CPU exceeds a CPU utilization upper threshold (e.g., 90%) within a certain period (e.g., 10 s) of a less busy CPU, it is marked as a busy processor; if a certain busy CPU exceeds a CPU utilization low threshold (e.g., 70%) within a certain period (e.g., 30 s), it is marked as a non-busy processor. It will be appreciated that all CPUs are initially non-busy CPUs.
It will be appreciated that in the event that it is determined that there is matching session information in the existing session information of the first processor that matches the client, the data information from the client is processed by the first processor. As in the processing of messages of existing sessions, the stream of an existing session on the CPU is always processed according to the session cpu_id, and is not changed by marking the CPU as a busy CPU or canceling the busy CPU marking.
It will be appreciated that in the event that it is determined that there is no matching session information matching the client in the existing session information of the first processor, a new session is required.
In this step, when a session is newly established, it is necessary to determine whether to invoke the second algorithm according to the utilization rate of the first processor to determine the second processor.
It will be appreciated that existing session processing allocates a cpu without regard to the load condition of the cpu. In some cases, there are more messages that need to be processed by some cores, and fewer messages that need to be processed by some cores. This situation may cause overload of cores handling more messages and packet loss, while other cores are in idle state.
For determining the second processor using the second algorithm, for example: since each CPU and core utilization is monitored, both busy and less busy processors can be determined. Thus, one of the at least one less busy processor may be optionally selected as the second processor. When there are a plurality of less busy processors, the CPU with the lowest usage rate may also be preferable as the second processor.
Further, the data information may be processed by the second processor, such as forwarding the data information to the second processor for processing.
In operation S240, session information is created in the first processor and the second processor, respectively, resulting in first session information stored in the first processor and second session information stored in the second processor.
In this step, both the first processor and the second processor hold session information. The first session information is different from the second session information.
In operation S250, data information from the client is processed based on the first session information and the second session information.
For example, first sub data information from the client is processed based on the first session information and the second session information. For example, in response to receiving the second sub-data information from the client, determining the first processor using the first algorithm; responsive to obtaining the first session information, determining to forward second sub-data information from the client to the second processor in accordance with the first session information; and in response to acquiring the second session information, determining to process the second sub-data information with the second processor according to the second session information.
According to the data information processing method provided by the embodiment, the non-busy processor such as the second processor is determined, session information is respectively created in the first processor and the second processor, then the data information from the client is processed based on the first session information and the second session information, for example, the first sub-data information can be processed by the second processor, so that the situation of uneven load of a data information processing core is optimized, the packet loss rate is reduced, and the service stability is improved.
The data information further includes second sub-data information, the first session information characterizing: the data information from the client needs to be forwarded to the second processor; second session information characterization: calculating the data information from the client by a second algorithm to obtain a calculation result, and processing the data information from the client by a processor corresponding to the calculation result; based on the first session information and the second session information, processing the data information from the client includes: determining a first processor by utilizing a first algorithm in response to receiving second sub-data information from the client, and acquiring the existing session information of the first processor; in response to the first session information being acquired, determining to forward second sub-data information from the client to the second processor according to the first session information, and acquiring existing session information of the second processor; and in response to the second session information being acquired, processing the second sub-data information with the second processor in accordance with the second session information if it is determined that the processor corresponding to the calculation result matches the second processor.
For example, a message (e.g., first sub-data information) is received, a message processing CPU is calculated using a default hash algorithm (e.g., first algorithm), and is processed by the default CPU (e.g., first processor). And searching the matched session information in the default CPU. If no matching session information is found, then continuing to determine whether the first processor is busy. If not busy, directly creating a session, wherein the cpu_id stored in the session is the cpu_id of the first processor.
In addition, if matching session information is found, it is necessary to determine whether the session cpu_id field is the same as the first processor (a); if the session cpu_id field of the matching session information is different from the cpu_id field, the message is forwarded to the second processor (r) for processing. If the same, if the session cpu_id field of the matching session information is CPU id_a, the first processor processes the message.
It will be appreciated that when the processed message belongs to a new stream (i.e. the session information of the stream is not created on the first processor (a)), it is further determined that if the CPU id_a is a busy CPU, i.e. the first processor is busy, a second algorithm is invoked, by which a less busy CPU id_r is recalculated, e.g. by the second processor (r). Session information for this stream is then created on both the first processor (a) and the second processor (r). For example, the session information cpu_id on CPU id_a is assigned as id_r, indicating that the message is actually to be handed to CPU id_r (i.e., the second processor) for processing. And the session information cpu_id on the cpu_id_r is assigned as-id_r, which indicates that the processor result (such as the second processor (r)) obtained by calculating the message by a random algorithm (namely the second algorithm) different from the default hash algorithm is handed to the second processor (r) for processing. It will be appreciated that the original random algorithm (i.e., the default hash algorithm, the first algorithm) is not handed to the CPU id_r (the second processor (r)) for processing. Since the session information cpu_id is assigned as id_r on the first processor (a), the CPU id_a gives the message to the second processor (r) for processing.
Processing the second sub-data information with the second processor is determined for according to the second session information. For example, the second session information characterizes: and calculating the data information from the client by a second algorithm to obtain a calculation result, and processing the data information from the client by a processor corresponding to the calculation result. A second algorithm is invoked to determine a second processor (r). And can then find matching session information (i.e., -id _ r). Judging whether the session cpu_id field (-id_r) is identical to the second processor (r) or not, it can be seen that the same matches, and thus determining to process the second sub data information with the second processor.
In this embodiment, the second sub data information may include a subsequent message of the stream, so that by reading the session information (the first session information and the second session information) through the session, the second sub data information may be transferred to the CPU id_r for processing, i.e. the second processor (r).
It can be appreciated that due to the first session information characterization: the data information from the client needs to be forwarded to the second processor; second session information characterization: and calculating the data information from the client by a second algorithm to obtain a calculation result, and processing the data information from the client by a processor corresponding to the calculation result. It may thus be determined from the first session information to forward the second sub-data information from the client to the second processor; processing the second sub-data information with the second processor is determined based on the second session information.
The data information processing method provided by the embodiment determines the first processor by using the first algorithm in response to receiving the second sub-data information from the client; responsive to obtaining the first session information, determining to forward second sub-data information from the client to the second processor in accordance with the first session information; and in response to the second session information being acquired, determining to process the second sub-data information with the second processor based on the second session information, enabling processing of subsequent data information from the client with the second processor.
In the case that it is determined that there is matching session information matching the client in the existing session information of the first processor, the method further includes: judging whether the matched session information is first session information; and processing the data information from the client according to the first session information in the case that the matching session information is determined to be the first session information.
For example, the first session information cpu_id on the first processor (a) is assigned a value such as id_r, so CPU id_a gives the message to the second processor (r) for processing. The message may be forwarded to a second processor for further processing by the second processor.
Fig. 3 schematically shows a flow chart of a data information processing method according to another embodiment of the invention.
As shown in fig. 3, the embodiment includes operations S260 to S270, and the data information processing method may be executed by a server.
In operation S260, it is determined that the second session information satisfies the condition of the session aging process, a deletion instruction of the first session information is transmitted to the first processor, and the second session information is deleted.
In operation S270, the first processor deletes the first session information in response to receiving the deletion instruction.
It is understood that it is necessary to determine whether the second session information satisfies the condition of the session aging process before operation S260.
Session aging: after the session is established, no data is transmitted for a period of time, and the two ends of the session are automatically disconnected. The session can be supervised, and session information meeting the aging processing conditions of the session is fed back according to the supervision result of the preset time.
It will be appreciated that in the above scenario, the first processor cannot actively delete the session information of the stream, and when the second processor needs to delete the session information of the stream (e.g. receives a message that the second session information satisfies the condition of the session aging process), according to the second session information, for example, the cpu_id value is-id_r, it may be presumed that the session should be allocated to other cpu processes according to the original random algorithm (the first algorithm), so id_a may be obtained by calculating using the original random algorithm, thereby determining the first processor (a). Thus sending a message to the first processor (a) informing the first processor CPU id_a to delete the session information, i.e. to delete the first session information (id_r).
For the session aging processing, if the session processing cpu is acquired through the second algorithm, the actual processing cpu (the second processor) of the session loads aging deletion, and when deleting, a message is sent to the default processing cpu (the first processor) at the same time, so as to inform the default processing cpu of the session to delete the session.
The data information processing method provided by the embodiment realizes the deletion processing of the first session information and the second session information.
And responding to the received session information inquiry request from the client, and acquiring a session information inquiry result based on the second processor.
For example, for session query processing, a default cpu (first processor) is found first, and a cpu (second processor) actually processed by the session is found through the stored session cpu_id field of the default cpu. And then the information of the query session in the session actual processing cpu.
The data information processing method provided by the embodiment realizes that the information of the query session in the CPU is actually processed by the session, so that the session information query result is obtained.
Based on the data information processing method, the invention also provides a data information processing device. The device will be described in detail below in connection with fig. 4.
Fig. 4 schematically shows a block diagram of a data information processing apparatus according to an embodiment of the present invention.
As shown in fig. 4, the data information processing apparatus 400 of this embodiment includes a first determination module 410, a judgment module 420, a second determination module 430, a creation module 440, and a processing module 450.
A first determining module 410 for determining a first processor of the plurality of processors using a first algorithm in response to receiving data information from the client; wherein the data information includes first sub data information; a judging module 420, configured to judge whether there is matching session information matching the client in the existing session information of the first processor; a second determining module 430, configured to determine, when it is determined that there is no matching session information that matches the client in the existing session information of the first processor, and when the first processor is a busy processor, a second processor of the plurality of processors by using a second algorithm, where the second processor is a non-busy processor; a creating module 440, configured to create session information in the first processor and the second processor, respectively, to obtain first session information stored in the first processor and second session information stored in the second processor; and a processing module 450 for processing data information from the client based on the first session information and the second session information.
In some embodiments, the data information further comprises second sub-data information, the first session information characterizing: the data information from the client needs to be forwarded to the second processor; the second session information characterizes: the second algorithm calculates the data information from the client to obtain a calculation result, and a processor corresponding to the calculation result processes the data information from the client; the processing module is used for: determining the first processor by using the first algorithm in response to receiving second sub-data information from the client, and acquiring existing session information of the first processor; in response to acquiring the first session information, determining to forward second sub-data information from a client to a second processor according to the first session information, and acquiring existing session information of the second processor; and in response to acquiring the second session information, processing the second sub-data information by using the second processor under the condition that the processor corresponding to the calculation result is determined to be matched with the second processor according to the second session information.
In some embodiments, in the event that it is determined that there is matching session information in the existing session information of the first processor that matches the client, the apparatus is further configured to: judging whether the matched session information is the first session information or not; and processing data information from the client according to the first session information under the condition that the matching session information is determined to be the first session information.
In some embodiments, in a case where it is determined that there is no matching session information matching the client in the existing session information of the first processor, the method further includes: in the event that the first processor is determined to be a less busy processor, data information from a client is processed with the first processor.
In some embodiments, the apparatus is further to: determining that the second session information meets the condition of session aging processing, sending a deleting instruction of the first session information to the first processor, and deleting the second session information; and the first processor deleting the first session information in response to receiving the deletion instruction.
In some embodiments, the apparatus is further to: and responding to the received session information inquiry request from the client, and acquiring a session information inquiry result based on the second processor.
Any of the first determining module 410, the judging module 420, the second determining module 430, the creating module 440, and the processing module 450 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the first determination module 410, the determination module 420, the second determination module 430, the creation module 440, and the processing module 450 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of any of the three implementations of software, hardware, and firmware. Alternatively, at least one of the first determination module 410, the judgment module 420, the second determination module 430, the creation module 440, and the processing module 450 may be at least partially implemented as a computer program module, which when executed, may perform the corresponding functions.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement a data information processing method according to an embodiment of the invention.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present invention includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 501 may also include on-board memory for caching purposes. The processor 501 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flow according to an embodiment of the invention.
In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are stored. The processor 501, ROM502, and RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM502 and/or the RAM 503. Note that the program may be stored in one or more memories other than the ROM502 and the RAM 503. The processor 501 may also perform various operations of the method flow according to embodiments of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 500 may further comprise an input/output (I/O) interface 505, the input/output (I/O) interface 505 also being connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. The program code means for causing a computer system to carry out the data information processing method provided by the embodiment of the present invention when the computer program product is run on the computer system.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 511 via the communication portion 509. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the invention and/or in the claims may be combined in various combinations and/or combinations even if such combinations or combinations are not explicitly recited in the invention. In particular, the features recited in the various embodiments of the invention and/or in the claims can be combined in various combinations and/or combinations without departing from the spirit and teachings of the invention. All such combinations and/or combinations fall within the scope of the invention.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the invention is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.

Claims (8)

1. A data information processing method, comprising:
determining a first processor of the plurality of processors using a first algorithm in response to receiving the data information from the client; wherein the data information comprises first sub-data information, the first algorithm comprising a default hash algorithm configured for the data information;
Judging whether the prior session information of the first processor has matched session information matched with the client;
determining a second processor of the plurality of processors using a second algorithm, the second processor being a less busy processor, the second algorithm comprising a different random algorithm than the default hash algorithm, if it is determined that there is no matching session information in the existing session information of the first processor that matches the client and the first processor is a busy processor;
respectively creating session information in the first processor and the second processor to obtain first session information stored in the first processor and second session information stored in the second processor; and
processing data information from a client based on the first session information and the second session information;
wherein the data information further comprises second sub-data information, the first session information characterizes: the data information from the client needs to be forwarded to the second processor; the second session information characterizes: the second algorithm calculates the data information from the client to obtain a calculation result, and a processor corresponding to the calculation result processes the data information from the client;
The processing data information from the client based on the first session information and the second session information includes:
determining the first processor by using the first algorithm in response to receiving second sub-data information from the client, and acquiring existing session information of the first processor;
in response to acquiring the first session information, determining to forward second sub-data information from a client to a second processor according to the first session information, and acquiring existing session information of the second processor; and
and in response to acquiring the second session information, processing the second sub-data information by using the second processor under the condition that the processor corresponding to the calculation result is determined to be matched with the second processor according to the second session information.
2. The method of claim 1, wherein in the event that it is determined that there is matching session information in the existing session information of the first processor that matches the client, the method further comprises:
judging whether the matched session information is the first session information or not; and
and processing data information from the client according to the first session information under the condition that the matching session information is determined to be the first session information.
3. The method of claim 1, wherein in the event that it is determined that there is no matching session information in the existing session information of the first processor that matches the client, further comprising:
in the event that the first processor is determined to be a less busy processor, data information from a client is processed with the first processor.
4. The method according to claim 1, wherein the method further comprises:
determining that the second session information meets the condition of session aging processing, sending a deleting instruction of the first session information to the first processor, and deleting the second session information; and
the first processor deletes the first session information in response to receiving the delete instruction.
5. The method according to claim 1, wherein the method further comprises:
and responding to the received session information inquiry request from the client, and acquiring a session information inquiry result based on the second processor.
6. A data information processing apparatus comprising:
a first determining module for determining a first processor of the plurality of processors using a first algorithm in response to receiving data information from the client; wherein the data information includes first sub data information;
The judging module is used for judging whether the matched session information matched with the client exists in the existing session information of the first processor;
a second determining module, configured to determine, by using a second algorithm, a second processor among the plurality of processors, where the second processor is a non-busy processor, in a case where it is determined that there is no matching session information that matches the client in existing session information of the first processor, and where the first processor is a busy processor;
the creation module is used for creating session information in the first processor and the second processor respectively to obtain first session information stored in the first processor and second session information stored in the second processor; and
a processing module, configured to process data information from a client based on the first session information and the second session information;
wherein the data information further comprises second sub-data information, the first session information characterizes: the data information from the client needs to be forwarded to the second processor; the second session information characterizes: the second algorithm calculates the data information from the client to obtain a calculation result, and a processor corresponding to the calculation result processes the data information from the client;
The processing module is used for:
determining the first processor by using the first algorithm in response to receiving second sub-data information from the client, and acquiring existing session information of the first processor;
in response to acquiring the first session information, determining to forward second sub-data information from a client to a second processor according to the first session information, and acquiring existing session information of the second processor; and
and in response to acquiring the second session information, processing the second sub-data information by using the second processor under the condition that the processor corresponding to the calculation result is determined to be matched with the second processor according to the second session information.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
8. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-5.
CN202310684497.2A 2023-06-12 2023-06-12 Data information processing method, device, electronic equipment and medium Active CN116436855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310684497.2A CN116436855B (en) 2023-06-12 2023-06-12 Data information processing method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310684497.2A CN116436855B (en) 2023-06-12 2023-06-12 Data information processing method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN116436855A CN116436855A (en) 2023-07-14
CN116436855B true CN116436855B (en) 2023-09-12

Family

ID=87085811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310684497.2A Active CN116436855B (en) 2023-06-12 2023-06-12 Data information processing method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116436855B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1838658A (en) * 2005-03-24 2006-09-27 中兴通讯股份有限公司 Method for realizing conversation dispatching in SIP multiprocessor system
US7155722B1 (en) * 2001-07-10 2006-12-26 Cisco Technology, Inc. System and method for process load balancing in a multi-processor environment
CN101013382A (en) * 2007-02-12 2007-08-08 杭州华为三康技术有限公司 Method and apparatus for managing session table
CN102763393A (en) * 2009-12-23 2012-10-31 思杰系统有限公司 Systems and methods for managing ports for rtsp across cores in a multi-core system
KR20130093843A (en) * 2012-01-27 2013-08-23 주식회사 시큐아이 Apparatus and method for processing packet using multiprocessr
CN104618152A (en) * 2015-01-19 2015-05-13 迈普通信技术股份有限公司 Session table aging method and system
CN105516302A (en) * 2015-12-07 2016-04-20 东软集团股份有限公司 Data processing method and network device
CN105634958A (en) * 2015-12-24 2016-06-01 东软集团股份有限公司 Packet forwarding method and device based on multi-core system
CN107612840A (en) * 2017-09-26 2018-01-19 东软集团股份有限公司 A kind of data processing method and device of four-layer load-equalizing equipment
CN107846364A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of message
CN108363621A (en) * 2018-01-18 2018-08-03 东软集团股份有限公司 Message forwarding method, device, storage medium under numa frameworks and electronic equipment
CN108667730A (en) * 2018-04-17 2018-10-16 东软集团股份有限公司 Message forwarding method, device, storage medium based on load balancing and equipment
CN110138662A (en) * 2019-05-08 2019-08-16 东软集团股份有限公司 Session entry processing method, device and multiple nucleus system in multiple nucleus system
CN110839084A (en) * 2019-11-19 2020-02-25 中国建设银行股份有限公司 Session management method, device, equipment and medium
CN111049750A (en) * 2019-12-05 2020-04-21 东软集团股份有限公司 Message forwarding method, system and equipment
WO2021109767A1 (en) * 2019-12-02 2021-06-10 华为技术有限公司 Network device and method for reducing transmission delay therefor
CN115408133A (en) * 2022-09-16 2022-11-29 浙江中控技术股份有限公司 Task scheduling method of multi-core structure, multi-core processing system, device and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200112439A (en) * 2019-03-22 2020-10-05 삼성전자주식회사 An electronic device comprising multi-cores and method for processing packet in the same

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7155722B1 (en) * 2001-07-10 2006-12-26 Cisco Technology, Inc. System and method for process load balancing in a multi-processor environment
CN1838658A (en) * 2005-03-24 2006-09-27 中兴通讯股份有限公司 Method for realizing conversation dispatching in SIP multiprocessor system
CN101013382A (en) * 2007-02-12 2007-08-08 杭州华为三康技术有限公司 Method and apparatus for managing session table
CN102763393A (en) * 2009-12-23 2012-10-31 思杰系统有限公司 Systems and methods for managing ports for rtsp across cores in a multi-core system
KR20130093843A (en) * 2012-01-27 2013-08-23 주식회사 시큐아이 Apparatus and method for processing packet using multiprocessr
CN104618152A (en) * 2015-01-19 2015-05-13 迈普通信技术股份有限公司 Session table aging method and system
CN105516302A (en) * 2015-12-07 2016-04-20 东软集团股份有限公司 Data processing method and network device
CN105634958A (en) * 2015-12-24 2016-06-01 东软集团股份有限公司 Packet forwarding method and device based on multi-core system
CN107846364A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of message
CN107612840A (en) * 2017-09-26 2018-01-19 东软集团股份有限公司 A kind of data processing method and device of four-layer load-equalizing equipment
CN108363621A (en) * 2018-01-18 2018-08-03 东软集团股份有限公司 Message forwarding method, device, storage medium under numa frameworks and electronic equipment
CN108667730A (en) * 2018-04-17 2018-10-16 东软集团股份有限公司 Message forwarding method, device, storage medium based on load balancing and equipment
CN110138662A (en) * 2019-05-08 2019-08-16 东软集团股份有限公司 Session entry processing method, device and multiple nucleus system in multiple nucleus system
CN110839084A (en) * 2019-11-19 2020-02-25 中国建设银行股份有限公司 Session management method, device, equipment and medium
WO2021109767A1 (en) * 2019-12-02 2021-06-10 华为技术有限公司 Network device and method for reducing transmission delay therefor
CN111049750A (en) * 2019-12-05 2020-04-21 东软集团股份有限公司 Message forwarding method, system and equipment
CN115408133A (en) * 2022-09-16 2022-11-29 浙江中控技术股份有限公司 Task scheduling method of multi-core structure, multi-core processing system, device and medium

Also Published As

Publication number Publication date
CN116436855A (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN111427701A (en) Workflow engine system and business processing method
CN113381944A (en) System current limiting method, apparatus, electronic device, medium, and program product
CN111478974B (en) Network connection method and device, electronic equipment and readable storage medium
CN113517985A (en) File data processing method and device, electronic equipment and computer readable medium
CN112600761A (en) Resource allocation method, device and storage medium
CN116303608A (en) Data processing method and device for application service
US20210314414A1 (en) Facilitating inter-proxy communication via an existing protocol
CN112084042A (en) Message processing method and device
CN116436855B (en) Data information processing method, device, electronic equipment and medium
CN116775167A (en) Service processing method, device, electronic equipment and computer readable medium
CN116095005A (en) Traffic management method, apparatus, device, medium, and program product
CN111580882B (en) Application program starting method, device, computer system and medium
CN112711572B (en) Online capacity expansion method and device suitable for database and table division
CN109213815B (en) Method, device, server terminal and readable medium for controlling execution times
CN113238808A (en) Message pushing method and device
CN113220981A (en) Method and device for optimizing cache
CN116112880B (en) MQ-based high concurrency short message sending method and device
CN111193656A (en) Message pushing method and device
CN115981910B (en) Method, apparatus, electronic device and computer readable medium for processing exception request
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN114844810B (en) Heartbeat data processing method, device, equipment and medium
CN114363339B (en) Traffic switching method, device, system, apparatus, medium and program product
CN116996481B (en) Live broadcast data acquisition method and device, electronic equipment and storage medium
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service
CN110262756B (en) Method and device for caching data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant