CN111176830A - Information flow distribution method and device and server system - Google Patents

Information flow distribution method and device and server system Download PDF

Info

Publication number
CN111176830A
CN111176830A CN201911222125.8A CN201911222125A CN111176830A CN 111176830 A CN111176830 A CN 111176830A CN 201911222125 A CN201911222125 A CN 201911222125A CN 111176830 A CN111176830 A CN 111176830A
Authority
CN
China
Prior art keywords
target
server system
identifier
determining
information stream
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.)
Granted
Application number
CN201911222125.8A
Other languages
Chinese (zh)
Other versions
CN111176830B (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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alipay Labs Singapore Pte 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 Alipay Labs Singapore Pte Ltd filed Critical Alipay Labs Singapore Pte Ltd
Priority to CN201911222125.8A priority Critical patent/CN111176830B/en
Priority claimed from CN201911222125.8A external-priority patent/CN111176830B/en
Publication of CN111176830A publication Critical patent/CN111176830A/en
Application granted granted Critical
Publication of CN111176830B publication Critical patent/CN111176830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries

Abstract

The embodiment of the specification provides an information flow distribution method, an information flow distribution device and a server system, wherein one method comprises the following steps: acquiring a target information stream to be distributed; determining a dependency relationship between a target information stream and a plurality of server systems, wherein the dependency relationship indicates that the target information stream depends on historical information streams stored in corresponding server systems; determining a server system corresponding to the target information stream according to the dependency relationship to serve as a target server system; and distributing the target information flow to the target server system. In one embodiment, the method may enable smooth migration of information flows between multiple server systems.

Description

Information flow distribution method and device and server system
Technical Field
The present specification relates to the field of information processing technology, and more particularly, to an information flow distribution method, an information flow distribution device, and a server system.
Background
For a response process to an information flow, the server system is required to process the information flow. However, many systems have newer generations of server systems, such as where a new server system uses a different logical architecture than an old server system, or where the new server system and the old server system are deployed in different regions or rooms.
Therefore, there is a need to provide a solution that can distribute newly generated information flows between a new server system and an old server system.
Disclosure of Invention
Embodiments of the present description provide a new solution for distributing information flows among multiple server systems.
According to a first aspect of the present specification, there is provided an information flow allocation method, including:
acquiring a target information stream to be distributed;
determining a dependency relationship between the target information stream and a plurality of server systems, wherein the dependency relationship indicates that the target information stream depends on historical information streams stored in corresponding server systems;
determining a server system corresponding to the target information stream according to the dependency relationship to serve as a target server system; and
and distributing the target information flow to the target server system.
Optionally, determining the dependency relationship between the target information stream and the plurality of server systems includes:
acquiring an identifier of the target information stream as a target identifier;
and determining a server system where the historical information flow with the identification corresponding to the target identification is located to obtain the dependency relationship.
Optionally, determining a server system where a history information stream having an identifier corresponding to the target identifier is located to obtain the dependency relationship includes:
acquiring a preset power table, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system;
and querying the power equal table according to the target identifier to obtain the dependency relationship.
Optionally, querying the power-equal table according to the target identifier to obtain the dependency relationship includes:
inquiring whether the identifier of the historical information stream recorded in the power-equal table contains the identifier corresponding to the target identifier;
determining that the target information stream is dependent on the corresponding server system if the corresponding identification is included; or
In the case that no corresponding identification is included, then it is determined that the target information stream is not dependent on the plurality of server systems.
Optionally, determining, according to the dependency relationship, a server system corresponding to the target information stream, and as the target server system, including:
and under the condition that the target information flow is not dependent on the plurality of server systems, determining the target server system according to a preset matching rule.
Optionally, determining the target server system according to a preset matching rule includes:
performing hash operation on the target identifier to obtain a hash value of the target identifier;
performing modular operation on the hash value based on a set value to obtain a module of the target identifier;
determining the target server system according to the model of the target identifier; or
And determining the target server system of the target information stream according to a preset distribution proportion corresponding to each server system.
Optionally, the method further includes:
and recording the corresponding relation between the target identification and the target server system in the power-equal table.
Optionally, the method further includes:
and carrying out adaptation processing on the message structure of the target information flow and the target server system, and transmitting the adapted target information flow to the target server system.
According to a second aspect of the present specification, there is provided an apparatus for distributing information streams, comprising:
the information flow acquisition module is used for acquiring a target information flow to be distributed;
a dependency relationship determining module, configured to determine a dependency relationship between the target information stream and a plurality of server systems, where the dependency relationship indicates that the target information stream depends on a history information stream stored in a corresponding server system;
the target system determining module is used for determining a server system corresponding to the target information stream according to the dependency relationship to serve as a target server system; and
and the information flow distribution module is used for distributing the target information flow to the target server system.
Optionally, the dependency relationship determining module is further configured to:
acquiring an identifier of the target information stream as a target identifier;
and determining a server system where the historical information flow with the identification corresponding to the target identification is located to obtain the dependency relationship.
Optionally, determining a server system where a history information stream having an identifier corresponding to the target identifier is located to obtain the dependency relationship includes:
acquiring a preset power table, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system;
and querying the power equal table according to the target identifier to obtain the dependency relationship.
Optionally, querying the power-equal table according to the target identifier to obtain the dependency relationship includes:
inquiring whether the identifier of the historical information stream recorded in the power-equal table contains the identifier corresponding to the target identifier;
determining that the target information stream is dependent on the corresponding server system if the corresponding identification is included; or
In the case that no corresponding identification is included, then it is determined that the target information stream is not dependent on the plurality of server systems.
Optionally, the target system determination module is further configured to:
and under the condition that the target information flow is not dependent on the plurality of server systems, determining the target server system according to a preset matching rule.
Optionally, determining the target server system according to a preset matching rule includes:
performing hash operation on the target identifier to obtain a hash value of the target identifier;
performing modular operation on the hash value based on a set value to obtain a module of the target identifier;
determining the target server system according to the model of the target identifier; or
And determining the target server system of the target information stream according to a preset distribution proportion corresponding to each server system.
Optionally, the method further includes:
means for recording a correspondence between the target identification and a target server system in the power-equal table.
Optionally, the method further includes:
and the module is used for carrying out adaptation processing on the message structure of the target information flow and the target server system and transmitting the adapted target information flow to the target server system.
According to a third aspect of the present specification, there is provided a server system comprising: a processor and a memory for storing executable instructions for controlling the processor to perform the method according to the first aspect of the specification.
Other features of the present description and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a block diagram of a hardware configuration of an information processing system that can be used to implement an embodiment.
FIG. 2 illustrates a schematic diagram of an application scenario of an embodiment.
FIG. 3 shows a schematic flow chart diagram of an allocation method of information flows of an embodiment.
Fig. 4 shows a flow chart of an example of an allocation method of information streams.
FIG. 5 shows a block diagram of an apparatus for distribution of information flow for one embodiment.
FIG. 6 illustrates a block diagram of a server system of an embodiment.
Detailed Description
Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 is a schematic structural diagram of a configuration of an information flow distribution system to which an information flow distribution method according to an embodiment of the present specification can be applied.
As shown in fig. 1, the information flow distribution system 1000 of the present embodiment includes a server system 1100, a terminal apparatus 1200, and a network 1300.
The server system 1100 may be, for example, a blade server, a rack server, or the like, and the server 1100 may also be a server cluster deployed in a cloud, which is not limited herein.
As shown in FIG. 1, server system 1100 may include a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150, and an input device 1160. The processor 1110 may be, for example, a central processing unit CPU or the like. The memory 1120 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1130 includes, for example, a USB interface, a serial interface, and the like. The communication device 1140 is capable of wired or wireless communication, for example. The display device 1150 is, for example, a liquid crystal display panel. Input devices 1160 may include, for example, a touch screen, a keyboard, and the like.
In this embodiment, the memory 1120 of the server system 1100 is configured to store instructions for controlling the processor 1110 to operate so as to execute the information flow allocation method according to any of the embodiments of the present disclosure. The skilled person can design the instructions according to the solution disclosed in the present specification. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
Those skilled in the art will appreciate that although a number of devices are shown in FIG. 1 for the server 1100, the server 1100 of embodiments of the present specification may refer to only some of the devices, for example, the processor 1110 and the memory 1120.
As shown in fig. 1, the terminal apparatus 1200 may include a processor 1210, a memory 1220, an interface device 1230, a communication device 1240, a display device 1250, an input device 1260, an audio output device 1270, an audio input device 1280, and the like. The processor 1210 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1220 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1230 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1240 can perform wired or wireless communication, for example. The display device 1250 is, for example, a liquid crystal display, a touch display, or the like. The input device 1260 may include, for example, a touch screen, a keyboard, and the like. The terminal apparatus 1200 may output the audio information through the audio output device 1270, the audio output device 1270 including a speaker, for example. The terminal apparatus 1200 may pick up voice information input by the user through the audio pickup device 1280, and the audio pickup device 1280 includes, for example, a microphone.
The terminal device 1200 may be any device that can support operation of a service system, such as a smart phone, a laptop, a desktop computer, and a tablet computer.
In this embodiment, the memory 1220 of the terminal device 1200 is configured to store instructions for controlling the processor 1210 to operate in support of implementing the method for allocating an information stream according to any of the embodiments of the present description. The skilled person can design the instructions according to the solution disclosed in the present specification. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
It should be understood by those skilled in the art that although a plurality of devices of the terminal apparatus 1200 are shown in fig. 1, the terminal apparatus 1200 of the present embodiment may refer to only some of the devices, for example, only the processor 1210, the memory 1220, the display device 1250, the input device 1260 and the like.
The communication network 1300 may be a wireless network or a wired network, and may be a local area network or a wide area network. The terminal apparatus 1200 can communicate with the server 1100 through the communication network 1300.
The information handling system 1000 shown in FIG. 1 is for explanation only and is not intended to limit the specification, its application, or uses in any way. For example, although fig. 1 shows only two server systems 1100 and one terminal device 1200, it is not meant to limit the respective numbers, and multiple server systems 1100 and/or multiple terminal devices 1200 may be included in the information flow distribution system 1000.
Fig. 2 is a schematic diagram of an application scenario of an embodiment of the present specification.
In the application scenario shown in FIG. 2, the logical architecture and/or deployment site of server system 1100-1 and server system 1100-2 may differ. The user performs a business operation such as purchase or refund through the terminal device 1200, and the terminal device 1200 may generate a target information stream and transmit the target information stream to the server system 1100-1 for processing. The information flow server system 1100-1 determines the dependency of the target information flow with the server system 1100-1 and the server system 1100-2. If the target information stream is dependent on the server system 1100-1, the target information stream is distributed to the server system 1100-1 and processed accordingly by the server system 1100-1 itself. If the target information stream is dependent on the server system 1100-2, the target information stream is assigned to the server system 1100-2 so that the server system 1100-2 processes the target information stream accordingly. If the target information flow does not depend on all server systems, determining a target server system corresponding to the target information flow according to a preset matching rule; if the target server system is the server system 1100-1, the target information flow is distributed to the server system 1100-1, and the server system 1100-1 carries out corresponding processing on the target information flow; if the target server system is the server system 1100-2, the target information stream is distributed to the server system 1100-2 so that the server system 1100-2 processes the target information stream accordingly.
< method examples >
FIG. 3 is a schematic flow chart diagram of a method for allocating information flows of one embodiment.
In one or more embodiments of the present description, the method illustrated in FIG. 3 may be implemented by a server system, which may be the server system 1100 illustrated in FIG. 1.
As shown in fig. 3, the method of the present embodiment includes the following steps S302 to S308:
step S302, obtaining the target information flow to be distributed.
In one or more embodiments of the present description, an information stream is passed through server system 1100-1 to server system 1100-2 and then to server system 1100-3, each of which performs different processing on the information stream and forwards the request downstream.
The target information flow is required to execute the information flow distributed by the server system of the embodiment of the present specification. The target information stream may be generated by the terminal device 1200 and directly transmitted to the server system executing the embodiment of the present specification, or may be obtained by processing the information stream generated by the terminal device 1200 by another server system and transmitted to the server system executing the embodiment of the present specification.
Step S304, determining the dependency relationship between the target information flow and the plurality of server systems.
Wherein the dependency indicates that the target information stream depends on the historical information streams stored in the corresponding server system.
Specifically, the server system stores the history information stream, and may include that the history information stream is stored in the server system, or the server system processes the history information stream.
In one or more embodiments of the present description, determining the dependency relationship between the target information stream and the plurality of server systems may include steps S3042 to S3044 shown as follows:
step S3042, an identifier of the target information stream is acquired as the target identifier.
In one or more embodiments of the present description, the identification of the information stream may be made up of numbers and/or characters. The identification of the target information stream may correspond to the identification of the dependent history information stream, i.e. the identification of the target information stream may be the same as, or have a correspondence with, the identification of the dependent history information stream.
For example, the target identification of the target information stream may be AAFEF-2, and the identification corresponding to the target identification may be AAFEF-? Wherein? And may represent any number and/or character.
In one embodiment of the present description, the identification of the information flow may be an order number. For example, the target information stream may be a refund information stream and the identified historical information stream corresponding to the target identification may be a purchase information stream.
Step S3044, determining a server system where the history information stream having the identifier corresponding to the target identifier is located, so as to obtain the dependency relationship.
In this embodiment, the target information stream may depend on the server system where the identified historical information stream corresponding to the target identifier is located. For example, if a historical information stream of identities corresponding to the target identity is stored in the server system 1100-2, then the target information stream may be determined to be dependent on the server system 1100-2.
In one or more embodiments of the present description, determining a server system where a historical information stream having an identity corresponding to the target identity is located to obtain the dependency relationship may further include:
step S30442, a preset power table is obtained, where a correspondence between the identifier of the history information stream and the server system is recorded in the power table.
In one or more embodiments of the present description, the identification of all historical information streams (including the historical information streams stored in all server systems) and the server system in which each historical information stream is located are recorded in an idempotent table. From the idempotent table, the server system in which each historical information stream is located can be determined.
The idempotent table may be updated as the information flow increases.
Step S30444, query the idempotent table according to the target identifier to obtain the dependency relationship.
In one or more embodiments of the present specification, it may be determined whether an identifier corresponding to the target identifier is included in the identifiers of the history information streams recorded in the power-equivalent table; determining that the target information stream depends on a corresponding server system in the case of containing the identifier corresponding to the target identifier, wherein the corresponding server system may be a server system where a history information stream of the identifier corresponding to the target identifier is located; in case no identity corresponding to the target identity is included, it is then determined that the target information stream is not dependent on the plurality of server systems, i.e. the target information stream is not dependent on any server system.
And step S306, determining a server system corresponding to the target information stream as a target server system according to the dependency relationship.
In one or more embodiments of the present specification, determining a server system corresponding to a target information flow according to a dependency relationship may include, as the target server system: in the case where the target information stream is determined to be dependent on the corresponding server system, the corresponding server system is taken as the target server system.
In one or more embodiments of the present specification, determining a server system corresponding to a target information flow according to a dependency relationship may include, as the target server system: and under the condition that the target information flow is not dependent on the plurality of server systems, determining the target server system according to a preset matching rule.
In one or more embodiments of the present specification, determining the target server system according to the preset matching rule may include:
carrying out Hash operation on the target identifier to obtain a Hash value of the target identifier;
performing modular operation on the hash value based on the set value to obtain a module of the target identifier;
and determining the target server system according to the model of the target identifier.
The hash operation is to transform an input of arbitrary length into an output of fixed length by a hash algorithm. After the hash operation is performed on the target identifier, the obtained hash value of the target identifier may be an integer number. Since different inputs may hash to the same output, hashing different target identifications may result in the same hash value.
The setting value may be a specific value preset according to an application scenario or specific requirements, for example, the setting value may be, but is not limited to, 100. The norm of the target value is smaller than the set value.
And performing modular operation on the hash value based on the set value, specifically calculating an integer quotient obtained by dividing the hash value by the set value, calculating a product of the integer quotient and the set value, and calculating a difference value between the hash value and the product, namely the module of the target identifier.
For example, if the hash value is a and the setting value is b, then performing a modulo operation on the hash value based on the setting value can be expressed as: and c is a/b, and r is a-c b, wherein r is the modulus of the target mark.
In one or more embodiments of the present description, the manner of determining the target server system according to the model of the target identifier may include:
the value range corresponding to each server system is predetermined, and the value ranges can cover all non-negative integers smaller than the set value. The target server system corresponding to the target information stream can be determined by determining which server system the modulus of the target identifier belongs to.
For example, the numerical range corresponding to the server system 1100-1 includes [0, 50 ], the numerical range corresponding to the server system 1100-2 includes [50, 99], and then, in case that the modulus of the target identifier is greater than or equal to 0 and less than 50, the target server system corresponding to the target information stream may be determined as the server system 1100-1; in the case that the modulo of the target identifier is greater than or equal to 50 and less than or equal to 99, the target server system corresponding to the target information stream may be determined to be the server system 1100-2.
In one or more embodiments of the present description, the manner of determining the target server system according to the model of the target identifier may include:
the mantissa corresponding to each server system is predetermined, and the target server system corresponding to the target information stream can be determined by determining which server system the mantissa of the modulus of the target identifier corresponds to. Where the mantissa of the modulus of the target identification may be the last bit of the value. For example, if the modulo of the target identifier is 14, then the mantissa of the modulo of the target identifier is 4; for another example, if the modulo of the target identifier is 1, then the mantissa of the modulo of the target identifier is 1.
For example, if the mantissa corresponding to the server system 1100-1 includes 1, 3, 5, 7, and 9, and the mantissa corresponding to the server system 1100-2 includes 2, 4, 6, 8, and 0, then if the mantissa of the modulo of the target identifier is any one of 1, 3, 5, 7, and 9, it may be determined that the target server system corresponding to the target information stream is the server system 1100-1; if the mantissa of the modulus of the target identifier is any one of 2, 4, 6, 8, and 0, it may be determined that the target server system corresponding to the target information stream is the server system 1100-2.
In one or more embodiments of the present specification, the determining the target server system according to the preset matching rule may include:
and determining a target server system corresponding to the target information flow according to the acquisition time of the target information flow.
Specifically, a time period corresponding to each server system may be predetermined, and the target server system corresponding to the target information stream may be determined by determining to which server system the acquisition time of the target information stream belongs.
For example, the time period corresponding to the server system 1100-1 is 00:00 to 18:00, and the time period corresponding to the server system 1100-2 is 18:01 to 24:00, then if the acquisition time of the target information stream is between 00:00 to 18:00, the target server system corresponding to the target information stream may be determined to be the server system 1100-1; if the time of acquiring the target information stream is between 18:01 and 24:00, the target server system corresponding to the target information stream may be determined to be the server system 1100-2.
In one or more embodiments of the present specification, the determined target information flow independent of the plurality of server systems may be a plurality, and then determining the target server system according to a preset matching rule may include:
and determining a target server system of the target information flow according to a preset distribution proportion corresponding to each server system.
For example, the distribution ratio corresponding to the server system 1100-1 may be 30%, and the distribution ratio corresponding to the server system 1100-2 may be 70%, then, 30% of the target server systems that do not depend on the target information streams of the plurality of server systems may be selected as the server system 1100-1; and selecting 70% of target server systems corresponding to the target information streams independent of the plurality of server systems as the server system 1100-2. Wherein the target information streams corresponding to different server systems are all different.
Step S308, distributing the target information flow to the target server system.
In one or more embodiments of the present description, if the target server executes the method of the present embodiment, the target information stream may be directly processed by the target server executing the method of the present embodiment.
If the method of this embodiment is executed by another server system other than the target server in the plurality of server systems, that is, the method is applied to another server system, the method may further include: and carrying out adaptation processing on the message structure of the target information flow and the target server system, and transmitting the target information flow after the adaptation processing to the target server system so that the target server system can correspondingly process the target information flow after the adaptation processing.
In one or more embodiments of the present description, after performing step S306 or step S308, the method may further include:
and recording the corresponding relation between the target identification and the target server system in the power table so as to realize the updating of the power table and facilitate the determination of the dependency relation between the subsequent information flow and the plurality of server systems.
In one embodiment, the method may enable smooth migration of information flows between multiple server systems. In one embodiment, the method may enable switching of information flow among multiple server systems. In one embodiment, the method can avoid affecting the front-end service generating the information flow during the distribution process of the information flow. In one embodiment, the impact on front-end traffic may be reduced in the event of a failure of one server system. In some embodiments, it may be possible to have more than one of the above effects simultaneously.
< example 1>
The following describes the process implemented by the information flow distribution method with an example of a specific application scenario as shown in fig. 2. As shown in fig. 4, the method includes:
step S402, obtaining the target information flow to be distributed.
Step S404, acquiring the identifier of the target information stream as the target identifier.
Step S406, a preset power table is obtained, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system.
And step S408, inquiring the idempotent table according to the target identification to obtain the dependency relationship.
Inquiring whether the identifier of the historical information stream recorded in the power table contains the identifier corresponding to the target identifier; determining that the target information stream is dependent on the corresponding server system in case of containing an identifier corresponding to the target identifier; in case no identity corresponding to the target identity is included, then it is determined that the target information stream is not dependent on the plurality of server systems.
In step S410, in the case where it is determined that the target information stream depends on the corresponding server system, the corresponding server system is set as the target server system.
Step S412, determining the target server system according to a preset matching rule under the condition that the target information stream is determined not to depend on the plurality of server systems.
Step S414, allocating the target information stream to the target server system.
< apparatus embodiment >
In the present embodiment, an information stream distribution apparatus 5000 is provided. As shown in fig. 5, the information flow distribution apparatus 5000 includes an information flow acquisition module 5100, a dependency relationship determination module 5200, a target system determination module 5300, and an information flow distribution module 5400. The information flow obtaining module 5100 is configured to obtain a target information flow to be allocated; the dependency relationship determining module 5200 is configured to determine a dependency relationship between a target information stream and a plurality of server systems, where the dependency relationship indicates that the target information stream depends on a history information stream stored in a corresponding server system; the target system determining module 5300 is configured to determine, according to the dependency relationship, a server system corresponding to the target information stream as a target server system; the information flow distribution module 5400 is used to distribute the target information flow to the target server system.
In one or more embodiments of the present description, the dependency determination module 5200 may be further operable to:
acquiring an identifier of a target information stream as a target identifier;
and determining a server system where the historical information flow with the identification corresponding to the target identification is located so as to obtain the dependency relationship.
In one or more embodiments of the present description, determining a server system where a historical information stream having an identity corresponding to a target identity is located to derive a dependency comprises:
acquiring a preset power table, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system;
and querying the power equal table according to the target identification to obtain the dependency relationship.
In one or more embodiments of the present description, querying the power-equality table for dependencies based on the target identification comprises:
inquiring whether the identifier of the historical information stream recorded in the power table contains the identifier corresponding to the target identifier;
determining that the target information stream is dependent on the corresponding server system if the corresponding identification is included; or
In case no corresponding identification is included, then it is determined that the target information stream is not dependent on multiple server systems.
In one or more embodiments of the present description, the target system determination module 5300 may be further configured to:
and under the condition that the target information flow is not dependent on a plurality of server systems, determining the target server system according to a preset matching rule.
In one or more embodiments of the present specification, determining the target server system according to the preset matching rule includes:
carrying out Hash operation on the target identifier to obtain a Hash value of the target identifier;
performing modular operation on the hash value based on the set value to obtain a module of the target identifier;
determining a target server system according to the model of the target identifier; or
And determining a target server system of the target information flow according to a preset distribution proportion corresponding to each server system.
In one or more embodiments of the present description, the information flow distribution apparatus 5000 may further include:
means for recording a correspondence between the target identification and the target server system in an idempotent table.
In one or more embodiments of the present description, the information flow distribution apparatus 5000 may further include:
and the module is used for carrying out adaptation processing on the message structure of the target information flow and the target server system and transmitting the target information flow after the adaptation processing to the target server system.
The information flow distribution means 5000 can be implemented in various ways, as will be clear to a person skilled in the art. The information flow distribution means 5000 may be implemented, for example, by an instruction configuration processor. For example, the instructions may be stored in ROM and read from ROM into a programmable device when the apparatus is started up to implement the information flow distribution apparatus 5000. For example, the information stream distribution means 5000 may be solidified into a dedicated device (e.g. ASIC). The distribution means 5000 of the information streams may be divided into separate units or they may be combined together. The distribution means 5000 of the information stream may be implemented by one of the various implementations described above, or may be implemented by a combination of two or more of the various implementations described above.
In this embodiment, the information flow distribution device 5000 may have various implementation forms, for example, the information flow distribution device 5000 may be any functional module running in a software product or an application providing the information flow distribution function, or a peripheral insert, a plug-in, a patch, etc. of the software product or the application, and may also be the software product or the application itself.
< Server System >
In this embodiment, a server system 6000 is also provided. The server system 6000 may include the server system 1100 shown in fig. 1.
As shown in fig. 6, the server system 6000 may also include a processor 6100 and a memory 6200, the memory 6200 for storing executable instructions; the processor 6100 is configured to operate the server system 6000 to perform the method of assigning information streams according to any of the embodiments of the present specification according to the control of the instructions.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and the description of each embodiment is different from the description of the other embodiments. In particular, as for the device embodiment and the electronic apparatus embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The present description may be an electronic device, a method, and/or a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the specification.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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 Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present specification may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), can execute computer-readable program instructions to implement various aspects of the present description by utilizing state information of the computer-readable program instructions to personalize the electronic circuit.
Aspects of the present description are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the description. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart 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 description. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
The foregoing description of the embodiments of the present specification has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present description is defined by the appended claims.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or order of connection, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

Claims (17)

1. A method of distributing information streams, comprising:
acquiring a target information stream to be distributed;
determining a dependency relationship between the target information stream and a plurality of server systems, wherein the dependency relationship indicates that the target information stream depends on historical information streams stored in corresponding server systems;
determining a server system corresponding to the target information stream according to the dependency relationship to serve as a target server system; and
and distributing the target information flow to the target server system.
2. The method of claim 1, determining dependencies between the target information flow and a plurality of server systems comprising:
acquiring an identifier of the target information stream as a target identifier;
and determining a server system where the historical information flow with the identification corresponding to the target identification is located to obtain the dependency relationship.
3. The method of claim 2, determining a server system where a historical information stream having an identity corresponding to a target identity is located to derive the dependency comprises:
acquiring a preset power table, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system;
and querying the power equal table according to the target identifier to obtain the dependency relationship.
4. The method of claim 3, querying the power-equality table for the dependency according to the target identification comprises:
inquiring whether the identifier of the historical information stream recorded in the power-equal table contains the identifier corresponding to the target identifier;
determining that the target information stream is dependent on the corresponding server system if the corresponding identification is included; or
In the case that no corresponding identification is included, then it is determined that the target information stream is not dependent on the plurality of server systems.
5. The method of claim 4, determining the server system corresponding to the target information stream according to the dependency relationship, as a target server system, comprising:
and under the condition that the target information flow is not dependent on the plurality of server systems, determining the target server system according to a preset matching rule.
6. The method of claim 5, wherein determining the target server system according to the preset matching rule comprises:
performing hash operation on the target identifier to obtain a hash value of the target identifier;
performing modular operation on the hash value based on a set value to obtain a module of the target identifier;
determining the target server system according to the model of the target identifier; or
And determining the target server system of the target information stream according to a preset distribution proportion corresponding to each server system.
7. The method of claim 3, further comprising:
and recording the corresponding relation between the target identification and the target server system in the power-equal table.
8. The method of claim 1, further comprising:
and carrying out adaptation processing on the message structure of the target information flow and the target server system, and transmitting the adapted target information flow to the target server system.
9. An apparatus for distributing information streams, comprising:
the information flow acquisition module is used for acquiring a target information flow to be distributed;
a dependency relationship determining module, configured to determine a dependency relationship between the target information stream and a plurality of server systems, where the dependency relationship indicates that the target information stream depends on a history information stream stored in a corresponding server system;
the target system determining module is used for determining a server system corresponding to the target information stream according to the dependency relationship to serve as a target server system; and
and the information flow distribution module is used for distributing the target information flow to the target server system.
10. The apparatus of claim 9, the dependency determination module further to:
acquiring an identifier of the target information stream as a target identifier;
and determining a server system where the historical information flow with the identification corresponding to the target identification is located to obtain the dependency relationship.
11. The apparatus of claim 10, determining a server system where a historical information stream having an identity corresponding to a target identity is located to derive the dependency comprises:
acquiring a preset power table, wherein the power table records the corresponding relation between the identifier of the historical information stream and the server system;
and querying the power equal table according to the target identifier to obtain the dependency relationship.
12. The apparatus of claim 11, querying the power-equality table for the dependency according to the target identification comprises:
inquiring whether the identifier of the historical information stream recorded in the power-equal table contains the identifier corresponding to the target identifier;
determining that the target information stream is dependent on the corresponding server system if the corresponding identification is included; or
In the case that no corresponding identification is included, then it is determined that the target information stream is not dependent on the plurality of server systems.
13. The apparatus of claim 12, the target system determination module further to:
and under the condition that the target information flow is not dependent on the plurality of server systems, determining the target server system according to a preset matching rule.
14. The apparatus of claim 13, wherein determining the target server system according to a preset matching rule comprises:
performing hash operation on the target identifier to obtain a hash value of the target identifier;
performing modular operation on the hash value based on a set value to obtain a module of the target identifier;
determining the target server system according to the model of the target identifier; or
And determining the target server system of the target information stream according to a preset distribution proportion corresponding to each server system.
15. The apparatus of claim 11, further comprising:
means for recording a correspondence between the target identification and a target server system in the power-equal table.
16. The apparatus of claim 9, further comprising:
and the module is used for carrying out adaptation processing on the message structure of the target information flow and the target server system and transmitting the adapted target information flow to the target server system.
17. A server system, comprising: a processor and a memory for storing executable instructions for controlling the processor to perform the method of any of claims 1 to 8 when the electronic device is run.
CN201911222125.8A 2019-12-03 Information flow distribution method, device and server system Active CN111176830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911222125.8A CN111176830B (en) 2019-12-03 Information flow distribution method, device and server system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911222125.8A CN111176830B (en) 2019-12-03 Information flow distribution method, device and server system

Publications (2)

Publication Number Publication Date
CN111176830A true CN111176830A (en) 2020-05-19
CN111176830B CN111176830B (en) 2024-04-26

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559283A (en) * 2020-12-08 2021-03-26 中国联合网络通信集团有限公司 Signaling record processing method, device and equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708173A (en) * 2012-05-02 2012-10-03 奇智软件(北京)有限公司 Method and system for processing user requests of accessing to web pages
US8914850B1 (en) * 2011-10-14 2014-12-16 West Corporation Context aware transactions performed on integrated service platforms
CN107071059A (en) * 2017-05-25 2017-08-18 腾讯科技(深圳)有限公司 Distributed caching service implementing method, device, terminal, server and system
CN107070983A (en) * 2017-01-23 2017-08-18 天地融科技股份有限公司 A kind of load-balancing method, equipment and system forwarded based on address
CN107111519A (en) * 2014-11-11 2017-08-29 亚马逊技术股份有限公司 For managing the system with scheduling container
US20180131620A1 (en) * 2016-11-10 2018-05-10 Hughes Network Systems, Llc History-based classification of traffic into qos class with self-update
CN108153858A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Information-pushing method, device, storage medium and computer equipment
US20180332109A1 (en) * 2017-05-11 2018-11-15 International Business Machines Corporation Using network configuration analysis to improve server grouping in migration
CN109254778A (en) * 2018-08-31 2019-01-22 百度在线网络技术(北京)有限公司 Method and apparatus for deployment information streaming system
CN109327550A (en) * 2018-11-30 2019-02-12 网宿科技股份有限公司 A kind of distribution method of access request, device, storage medium and computer equipment
CN110287197A (en) * 2019-06-28 2019-09-27 微梦创科网络科技(中国)有限公司 A kind of date storage method, moving method and device
CN110389820A (en) * 2019-06-28 2019-10-29 浙江大学 A kind of private clound method for scheduling task carrying out resources based on v-TGRU model
CN110457128A (en) * 2019-07-11 2019-11-15 阿里巴巴集团控股有限公司 Method for allocating tasks, device and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8914850B1 (en) * 2011-10-14 2014-12-16 West Corporation Context aware transactions performed on integrated service platforms
CN102708173A (en) * 2012-05-02 2012-10-03 奇智软件(北京)有限公司 Method and system for processing user requests of accessing to web pages
CN107111519A (en) * 2014-11-11 2017-08-29 亚马逊技术股份有限公司 For managing the system with scheduling container
US20180131620A1 (en) * 2016-11-10 2018-05-10 Hughes Network Systems, Llc History-based classification of traffic into qos class with self-update
CN107070983A (en) * 2017-01-23 2017-08-18 天地融科技股份有限公司 A kind of load-balancing method, equipment and system forwarded based on address
US20180332109A1 (en) * 2017-05-11 2018-11-15 International Business Machines Corporation Using network configuration analysis to improve server grouping in migration
CN107071059A (en) * 2017-05-25 2017-08-18 腾讯科技(深圳)有限公司 Distributed caching service implementing method, device, terminal, server and system
CN108153858A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Information-pushing method, device, storage medium and computer equipment
CN109254778A (en) * 2018-08-31 2019-01-22 百度在线网络技术(北京)有限公司 Method and apparatus for deployment information streaming system
CN109327550A (en) * 2018-11-30 2019-02-12 网宿科技股份有限公司 A kind of distribution method of access request, device, storage medium and computer equipment
CN110287197A (en) * 2019-06-28 2019-09-27 微梦创科网络科技(中国)有限公司 A kind of date storage method, moving method and device
CN110389820A (en) * 2019-06-28 2019-10-29 浙江大学 A kind of private clound method for scheduling task carrying out resources based on v-TGRU model
CN110457128A (en) * 2019-07-11 2019-11-15 阿里巴巴集团控股有限公司 Method for allocating tasks, device and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ALEXANDER TOTOK: "Exploiting Service Usage Information for Optimizing Server Resource Management", ACM TRANSACTIONS ON INTERNET TECHNOLOGY, vol. 11, no. 1, 1 July 2011 (2011-07-01) *
刘明聪;王娜;周宁;: "基于依赖分析的云组合服务信息流控制机制", no. 04 *
曾建;鞠时光;宋香梅;: "基于依赖图的信息流图构建方法", no. 06 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559283A (en) * 2020-12-08 2021-03-26 中国联合网络通信集团有限公司 Signaling record processing method, device and equipment

Similar Documents

Publication Publication Date Title
US10430250B2 (en) Decomposing monolithic application into microservices
CN108156268B (en) Method for acquiring device identifier, server and terminal device
RU2701124C2 (en) Composite functions of partition
CN110391938B (en) Method and apparatus for deploying services
CN110825411B (en) Upgrading method and device for TWS (two way satellite System) earphone system and computer-readable storage medium
CN111736922B (en) Plug-in calling method and device, electronic equipment and storage medium
CN106873970B (en) Installation method and device of operating system
CN109634912B (en) Data migration method and system
CN112099836A (en) Configuration file updating method, configuration server, version control server and system
CN111309962A (en) Method and device for extracting audio clip and electronic equipment
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
US10031764B2 (en) Managing executable files
US20170257263A1 (en) Method and appartus to allow dynamic changes of a replica network configuration in distrubted systems
CN108234551B (en) Data processing method and device
WO2016078326A1 (en) Method, apparatus and system for displaying names of virtual machine
CN114816225A (en) Management method and device of storage cluster, electronic equipment and storage medium
CN113742332A (en) Data storage method, device, equipment and storage medium
CN111858156A (en) Mirror image management method and device and electronic equipment
CN111176830B (en) Information flow distribution method, device and server system
CN111176830A (en) Information flow distribution method and device and server system
CN107320959B (en) Game role identification information generation method, device, medium and electronic equipment
CN110765238A (en) Data encryption query method and device
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN107463808B (en) Method for calling functional module integrated in operating system
CN112788037B (en) Tenant data isolation method and device in cloud environment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240223

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Applicant after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: 45-01 Anson Building, 8 Shanton Avenue, Singapore

Applicant before: Alipay laboratories (Singapore) Ltd.

Country or region before: Singapore

GR01 Patent grant