CN115543651A - Stream message interface distribution method and related equipment - Google Patents

Stream message interface distribution method and related equipment Download PDF

Info

Publication number
CN115543651A
CN115543651A CN202211111860.3A CN202211111860A CN115543651A CN 115543651 A CN115543651 A CN 115543651A CN 202211111860 A CN202211111860 A CN 202211111860A CN 115543651 A CN115543651 A CN 115543651A
Authority
CN
China
Prior art keywords
interface
attribute
message
flow
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.)
Pending
Application number
CN202211111860.3A
Other languages
Chinese (zh)
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211111860.3A priority Critical patent/CN115543651A/en
Publication of CN115543651A publication Critical patent/CN115543651A/en
Pending legal-status Critical Current

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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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
    • 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/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a stream message interface distribution method and related equipment. The flow message interface distribution method comprises the following steps: responding to the entering of a flow message, and acquiring flow message attributes, wherein the flow message attributes are all attributes of the flow message; inquiring a first interface and a second interface to obtain a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface; comparing the stream message attribute, the first attribute and the second attribute, and determining a matching interface of the stream message; acquiring performance index data of the first interface and performance index data of the second interface; and determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message. The technical scheme of the embodiment of the application is simpler and faster, the screening cost is reduced, and the accuracy is improved.

Description

Stream message interface distribution method and related equipment
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a method for allocating a stream message interface and a related device.
Background
In the prior art, for various problems in the distribution of the flow message, such as whether various data flows conform to format messages of a new interface, whether the new interface can be normally called, and the like, a large amount of manpower is required to be consumed for physical screening, and the method is high in cost and low in accuracy.
Disclosure of Invention
Embodiments of the present application provide a method for allocating a stream message interface and a related device, so as to overcome, at least to a certain extent, the problem of high allocation cost and low accuracy of a stream message in the prior art.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a method for allocating a stream message interface, including:
responding to the entering of a flow message, and acquiring flow message attributes, wherein the flow message attributes are all attributes of the flow message;
inquiring a first interface and a second interface, and acquiring a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface;
comparing the stream message attribute, the first attribute and the second attribute, and determining a matching interface of the stream message;
acquiring performance index data of the first interface and performance index data of the second interface;
and determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message.
In an embodiment of the present application, the comparing the attributes of the flow message, the first attribute, and the second attribute, and determining the matching interface of the flow message specifically include:
if the stream message attribute does not contain any attribute in the first attributes, the matching interface of the stream message is the second interface;
if the flow message attribute comprises all attributes in the first attribute and the second attribute, comparing the attribute value of the flow message attribute with the attribute value of the first attribute to determine a matching interface of the flow message.
In an embodiment of the present application, if the flow message attribute includes all of the first attribute and the second attribute, the comparing the attribute value of the flow message attribute with the attribute value of the first attribute and the attribute value of the second attribute to determine the matching interface of the flow message specifically includes:
if the ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is equal to or greater than a predetermined ratio threshold, the matching interfaces of the flow message are the first interface and the second interface;
if the ratio of the attribute value of the stream message attribute to the attribute value of the first attribute is lower than a preset ratio threshold, acquiring historical characteristic data, comparing the historical characteristic data with the stream message, and determining a matching interface of the stream message.
In an embodiment of the present application, if a ratio of an attribute value of an attribute of the flow message to an attribute value of the first attribute is below a predetermined ratio threshold, acquiring historical feature data, comparing the historical feature data with the flow message, and determining a matching interface of the flow message specifically includes:
acquiring historical characteristic data, and comparing the historical characteristic data with the stream message to obtain a historical score;
if the historical score is larger than a preset historical score threshold value, the matched interfaces of the stream message are the first interface and the second interface;
and if the historical score is smaller than a preset historical score threshold value, sending the stream message attribute to a client, and judging a matching interface of the stream message by the client.
In an embodiment of the application, the obtaining of the historical feature data and comparing the historical feature data with the stream message to obtain a historical score specifically includes:
and inputting the historical characteristic data and the stream message into a historical scoring model, and outputting the historical score by the historical scoring model.
In an embodiment of the present application, the determining, according to the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the flow message, an interface allocated by the flow message specifically includes:
determining an interface flow ratio according to the performance index data of the first interface and the performance index data of the second interface;
and determining the interface allocated by the flow message according to the interface flow ratio and the matched interface of the flow message.
In an embodiment of the present application, the determining, according to the interface traffic ratio and the matching interface of the flow message, an interface allocated by the flow message specifically includes:
and inputting the interface flow ratio and the matched interface of the flow message into an interface distribution model, and outputting the interface distributed by the flow message by the interface distribution model.
According to an aspect of an embodiment of the present application, there is provided a streaming message interface allocating apparatus, including:
an attribute obtaining module, configured to obtain a stream message attribute in response to entry of a stream message, where the stream message attribute is all attributes of the stream message;
the interface query module is used for querying a first interface and a second interface and acquiring a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface;
the interface matching module is used for comparing the stream message attribute, the first attribute and the second attribute and determining a matching interface of the stream message;
a performance determining module, configured to obtain performance index data of the first interface and performance index data of the second interface;
and the interface allocation module is used for determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message.
According to an aspect of embodiments of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing a method for allocating a streaming message interface as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of flow message interface allocation as described in the embodiments above.
In the technical solutions provided in some embodiments of the present application, an interface matched with the streaming message is determined by comparing the streaming message attribute, the first attribute, and the second attribute, which is simpler and faster than a physical screening method, reduces the screening cost, and improves the accuracy. Meanwhile, the flow message is distributed according to the performance index data of each interface and the matched interface of the flow message, so that the flow message can be distributed to a more suitable interface, and the distribution accuracy of the flow message is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
Fig. 2 schematically shows a flow chart of a method of flow message interface allocation according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating a specific implementation of step S300 in the method for allocating a flow message interface according to the corresponding embodiment in fig. 2.
Fig. 4 is a flowchart illustrating a specific implementation of step S320 in the method for allocating a flow message interface according to the corresponding embodiment in fig. 3.
Fig. 5 is a flowchart illustrating a specific implementation of step S322 in the method for allocating a flow message interface according to the corresponding embodiment in fig. 4.
Fig. 6 is a flowchart illustrating a specific implementation of step S500 in the method for allocating a flow message interface according to the corresponding embodiment in fig. 2.
Fig. 7 schematically shows a block diagram of a flow message interface assignment arrangement according to an embodiment of the present application.
FIG. 8 illustrates the structure of a computer system suitable for use to implement the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a terminal device (e.g., one or more of a smartphone 101, a tablet computer 102, and a portable computer 103 shown in fig. 1, but may also be a desktop computer, etc.), a network 104, and a server 105. The network 104 serves as a medium for providing communication links between terminal devices and the server 105. Network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth.
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. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
A user may use a terminal device to interact with the server 105 over the network 104 to receive or send messages or the like. The server 105 may be a server that provides various services. For example, a user uploads a streaming message attribute to the server 105 by using the terminal device 103 (or the terminal device 101 or 102), and the server 105 may obtain the streaming message attribute in response to entry of a streaming message, where the streaming message attribute is all attributes of the streaming message; inquiring a first interface and a second interface to obtain a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface; comparing the stream message attribute, the first attribute and the second attribute, and determining a matching interface of the stream message; acquiring performance index data of the first interface and performance index data of the second interface; and determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message.
It should be noted that the method for allocating a streaming message interface provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the streaming message interface allocating apparatus is generally disposed in the server 105. However, in other embodiments of the present application, the terminal device may also have a similar function as the server, so as to execute the scheme of stream message interface allocation provided in the embodiments of the present application.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
fig. 2 shows a flowchart of a streaming message interface allocation method according to an embodiment of the present application, which may be performed by a server, which may be the server shown in fig. 1. Referring to fig. 2, the method for allocating a stream message interface at least includes:
step S100, responding to the entering of the stream message, and acquiring the stream message attribute, wherein the stream message attribute is all attributes of the stream message.
Step S200, a first interface and a second interface are inquired, a first attribute and a second attribute are obtained, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.
Step S300, comparing the stream message attribute, the first attribute and the second attribute, and determining a matching interface of the stream message.
Step S400, acquiring performance index data of the first interface and performance index data of the second interface.
Step S500, determining an interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface, and a matching interface of the flow message.
In the embodiment of the application, the attributes of the flow message, the first attribute and the second attribute are obtained first, then attribute comparison is performed, an interface which can be matched with the flow message, namely a matching interface, is determined, performance index data of each interface is obtained, and an interface allocated by the flow message is determined comprehensively according to the performance index data and the matching interface. Compared with a physical screening mode, the embodiment of the application is simpler and faster, the screening cost is reduced, and the accuracy is improved. Meanwhile, the flow message is distributed according to the performance index data of each interface and the matched interface of the flow message, so that the flow message can be distributed to a more suitable interface, and the distribution accuracy of the flow message is improved.
In step S100, the stream message attribute is all attributes of the stream message, including a user ID, a service ID, a timestamp, a message format, valid data, invalid data, and the like.
In step S200, the first attribute and the second attribute are obtained by respectively sending query stream messages to the first interface and the second interface, then respectively receiving second stream messages returned by the first interface and the second interface, and obtaining the first attribute and the second attribute by analyzing the returned stream messages.
In step S300, the stream message attribute is compared with the first attribute and the second attribute, and the matching interface is determined according to the comparison result, and the specific determination process may refer to the following embodiment.
Specifically, in some embodiments, a specific implementation of step S300 may be found in fig. 3. Fig. 3 is a detailed description of step S300 in the flow message interface allocation method according to the corresponding embodiment shown in fig. 2, where step S300 may include the following steps:
step S310, if the attributes of the flow message do not include any attribute in the first attributes, the matching interface of the flow message is the second interface.
Step S320, if the flow message attribute includes all attributes in the first attribute and the second attribute, comparing the attribute value of the flow message attribute with the attribute value of the first attribute, and determining a matching interface of the flow message.
In this embodiment, if the attributes of the flow message do not include all the attributes in the first attribute, it is proved that the flow message cannot be matched with the first interface, and at this time, the matched interface of the flow message is the second interface; if the stream message attribute includes all attributes in the first attribute and the second attribute, it is proved that the stream message is preliminarily matched with the first interface and the second interface, and the attribute value needs to be further compared to determine the matched interface, that is, the attribute value of the stream message attribute is compared with the attribute value of the first attribute to determine the matched interface of the stream message.
Specifically, in some embodiments, reference may be made to fig. 4 for a specific implementation of step S320. Fig. 4 is a detailed description of step S320 in the flow message interface allocation method according to the corresponding embodiment shown in fig. 3, where step S320 may include the following steps:
step S321, if the ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is equal to or greater than a predetermined ratio threshold, the matching interfaces of the flow message are the first interface and the second interface.
Step S322, if the ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is equal to or less than the predetermined ratio threshold, acquiring historical feature data, comparing the historical feature data with the flow message, and determining a matching interface of the flow message.
In this embodiment, if the ratio of the attribute value of the attribute of the flow message to the attribute value of the first attribute is equal to or greater than the predetermined ratio threshold, it is verified that the flow message matches both the first interface and the second interface, and at this time, the matching interfaces of the flow message are the first interface and the second interface; if the ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is lower than the preset ratio threshold, it is proved that the matching degree of the flow message and the first interface is not high, whether the matching requirement is met needs to be further confirmed, namely, historical characteristic data is obtained and compared with the flow message, and the matching interface of the flow message is determined.
Specifically, in some embodiments, reference may be made to fig. 5 for a specific implementation of step S322. Fig. 5 is a detailed description of step S322 in the flow message interface allocation method according to the corresponding embodiment in fig. 4, where step S322 in the flow message interface allocation method may include the following steps:
step S3221, obtaining historical feature data, and comparing the historical feature data with the stream message to obtain a historical score.
Step S3222, if the historical score is greater than a predetermined historical score threshold, the matching interfaces of the streaming message are the first interface and the second interface.
Step S3223, if the history score is smaller than a predetermined history score threshold, sending the attribute of the streaming message to a client, and determining, by the client, a matching interface of the streaming message.
In this embodiment, historical feature data is obtained first, and is compared with a flow message to obtain a historical score, where the historical feature data includes historical decision data and historical access data, that is, the historical feature data includes decision data of a previous flow message and access data of a previous flow message. If the historical score is larger than the preset historical score threshold value, the flow message can be distributed to the first interface and the second interface in the prior decision and operation, and the matched interfaces of the flow message are the first interface and the second interface; if the historical score is smaller than the preset historical score threshold value, the stream message is proved not to be generally distributed to the first interface, at the moment, the client side is required to assist in judgment, the stream message attribute is sent to the client side, and the client side judges the matched interface of the stream message. At the client, the determination may be performed automatically by a program of the client or manually, and the present application is not limited herein.
In some embodiments, for determining the historical score, reference may be made to the following embodiments, in which the specific step of determining the historical score includes:
and inputting the historical characteristic data and the stream message into a historical scoring model, and outputting the historical score by the historical scoring model.
In this embodiment, the historical feature data and the streaming messages may be sorted into a historical score vector having a plurality of dimensions, and then the historical score vector is input into a historical score model, and the historical score model outputs a historical score.
Specifically, the training method of the historical score model specifically includes: obtaining a historical scoring vector sample set, wherein each historical scoring vector sample calibrates a corresponding historical score in advance; respectively inputting the data of each historical scoring vector sample into a historical scoring model to obtain the historical score output by the process strategy; if the historical score obtained after the data of the historical score vector sample is input into a historical score model is inconsistent with the historical score calibrated in advance for the historical score vector sample, adjusting the coefficient of the process strategy until the historical score is consistent with the historical score; and when the data of all the historical scoring vector samples are input into a historical scoring model, the obtained historical scores are consistent with the historical scores calibrated in advance for the historical scoring vector samples, and the training is finished.
In step S400, the performance index data may include Query Per Second (QPS), transaction Per Second (TPS), time consumption of processing task, residual resource amount, etc., which may show the residual performance of the interface in different dimensions.
In step S500, a ratio of allocating flows to the two interfaces may be determined according to the performance index data of the first interface and the performance index data of the second interface, so as to regulate and control flow allocation on a macro level and avoid flow congestion, and meanwhile, an interface to which the flow message may flow may be determined according to a matching interface of the flow message, and flow allocation may be regulated and controlled on a micro level and avoid flow of the flow message to an unmatched interface.
Specifically, in some embodiments, reference may be made to fig. 6 for a specific implementation of step S500. Fig. 6 is a detailed description of step S400 in the flow message interface allocation method according to the corresponding embodiment shown in fig. 2, where step S500 may include the following steps:
step S510, determining an interface traffic ratio according to the performance index data of the first interface and the performance index data of the second interface.
Step S520, according to the interface flow rate ratio and the matched interface of the flow message, determining the interface allocated by the flow message.
In this embodiment, first, according to the performance index data of the first interface and the performance index data of the second interface, a ratio of allocated flows to the two interfaces, that is, an interface flow ratio is determined; and then determining the interface allocated by the flow message according to the interface flow ratio and the matched interface of the flow message.
In step S510, the interface traffic ratio may be determined by first determining the remaining performance of each interface according to the performance index data of each interface, and then determining the traffic ratio according to the remaining performance of each interface.
The residual performance may be determined by performing calculation according to query rates Per Second (QPS) of the first interface and the Second interface, transaction Throughput Per Second (TPS), time consumption of processing tasks, residual resource amount, and the like, and in general, the higher the time consumption of QPS, TPS, and processing tasks is, the less the residual performance is, the larger the residual resource amount is, the more the residual performance is, that is, the residual performance has a negative correlation with QPS, TPS, and processing tasks, and has a positive correlation with the residual resource amount.
In step S520, the assignment of the interfaces may list priorities for the assignment of the flow messages according to the matching degrees of the flow messages and the interfaces, assign the interfaces according to the priorities, or assign the interfaces according to an assignment model.
Specifically, in some embodiments, the assignment of interfaces may include the steps of:
and inputting the interface flow ratio and the matched interface of the flow message into an interface distribution model, and outputting the interface distributed by the flow message by the interface distribution model.
In this embodiment, the interface traffic ratio and the matching interface of the flow message may be first sorted into an interface allocation vector, and then the sorted interface allocation vector is input into an interface allocation model, and the interface allocation model outputs the interface allocated by the flow message.
Specifically, the training method for the interface allocation vector sample model specifically includes: acquiring an interface allocation vector sample set, wherein each interface allocation vector sample calibrates an interface allocated by the corresponding flow message in advance; inputting the data of each interface distribution vector sample into an interface distribution vector sample model respectively to obtain an interface distributed by the flow message output by the process strategy; if the obtained interface distributed by the flow message is inconsistent with the interface distributed by the flow message calibrated in advance for the interface distribution vector sample after the data input interface distribution vector sample model of the interface distribution vector sample exists, adjusting the coefficient of the flow strategy until the obtained interface distributed by the flow message is consistent with the interface distributed by the flow message calibrated in advance for the interface distribution vector sample; and when the data of all the interface distribution vector samples are input into an interface distribution vector sample model, the obtained interface distributed by the flow message is consistent with the interface distributed by the flow message calibrated in advance for the interface distribution vector sample, and the training is finished.
The following describes an embodiment of an apparatus of the present application, which may be used to perform a method for allocating a flow message interface in the foregoing embodiment of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method for allocating a flow message interface described above in the present application.
Fig. 7 shows a block diagram of a flow message interface assignment device according to an embodiment of the present application.
Referring to fig. 7, a flow message interface allocating apparatus 900 according to an embodiment of the present application includes:
an attribute obtaining module 910, configured to obtain a flow message attribute in response to entry of a flow message, where the flow message attribute is all attributes of the flow message.
The interface query module 920 is configured to query a first interface and a second interface to obtain a first attribute and a second attribute, where the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.
An interface matching module 930, configured to compare the stream message attribute, the first attribute, and the second attribute, and determine a matching interface of the stream message.
A performance determining module 940, configured to obtain performance indicator data of the first interface and performance indicator data of the second interface.
An interface allocation module 950, configured to determine an interface allocated by the flow message according to the performance indicator data of the first interface, the performance indicator data of the second interface, and a matching interface of the flow message.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above flow message interface allocation method, and is not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system of the electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, the computer system includes a Central Processing Unit (CPU) 1801, which can perform various appropriate actions and processes, such as executing the method described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1802 or a program loaded from a storage portion 1808 into a Random Access Memory (RAM) 1803. In the RAM 1803, various programs and data necessary for system operation are also stored. The CPU 1801, ROM 1802, and RAM 1803 are connected to each other via a bus 1804. An Input/Output (I/O) interface 1805 is also connected to bus 1804.
The following components are connected to the I/O interface 1805: an input portion 1806 including a keyboard, a mouse, and the like; an output section 1807 including a Display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1808 including a hard disk and the like; and a communication section 1809 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1809 performs communication processing via a network such as the internet. A driver 1810 is also connected to the I/O interface 1805 as needed. A removable medium 1811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1810 as necessary, so that a computer program read out therefrom is mounted in the storage portion 1808 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1809, and/or installed from the removable media 1811. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1801.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, 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 present application, 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. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
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 application. 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 that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for distributing a stream message interface is characterized in that the method for distributing the stream message interface comprises the following steps:
responding to the entering of a flow message, and acquiring flow message attributes, wherein the flow message attributes are all attributes of the flow message;
inquiring a first interface and a second interface to obtain a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface;
comparing the stream message attribute, the first attribute and the second attribute, and determining a matching interface of the stream message;
acquiring performance index data of the first interface and performance index data of the second interface;
and determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message.
2. The method for allocating a streaming message interface according to claim 1, wherein the comparing the streaming message attribute, the first attribute, and the second attribute and determining the matching interface of the streaming message specifically includes:
if the stream message attribute does not contain any attribute in the first attributes, the matching interface of the stream message is the second interface;
if the flow message attribute comprises all attributes in the first attribute and the second attribute, comparing the attribute value of the flow message attribute with the attribute value of the first attribute to determine a matching interface of the flow message.
3. The method for allocating a streaming message interface according to claim 2, wherein if the streaming message attribute includes all of the first attribute and the second attribute, the step of comparing the attribute value of the streaming message attribute with the attribute value of the first attribute and the attribute value of the second attribute to determine the matching interface of the streaming message specifically comprises:
if the ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is equal to or higher than a preset ratio threshold value, the matching interfaces of the flow message are the first interface and the second interface;
if the ratio of the attribute value of the stream message attribute to the attribute value of the first attribute is equal to or lower than a preset ratio threshold value, acquiring historical characteristic data, comparing the historical characteristic data with the stream message, and determining a matching interface of the stream message.
4. The method according to claim 3, wherein if a ratio of the attribute value of the flow message attribute to the attribute value of the first attribute is less than or equal to a predetermined ratio threshold, acquiring historical feature data, comparing the historical feature data with the flow message, and determining a matching interface of the flow message, specifically comprises:
acquiring historical characteristic data, and comparing the historical characteristic data with the stream message to obtain a historical score;
if the historical score is larger than a preset historical score threshold value, the matched interfaces of the stream message are the first interface and the second interface;
and if the historical score is smaller than a preset historical score threshold value, sending the stream message attribute to a client, and judging a matching interface of the stream message by the client.
5. The method for allocating a streaming message interface according to claim 4, wherein the obtaining of the historical feature data and the comparing with the streaming message to obtain the historical score specifically comprises:
and inputting the historical characteristic data and the stream message into a historical scoring model, and outputting the historical score by the historical scoring model.
6. The method for allocating interfaces of streaming messages according to claim 1, wherein the determining, according to the performance index data of the first interface, the performance index data of the second interface, and the matched interface of the streaming message, the interface allocated by the streaming message specifically includes:
determining an interface flow ratio according to the performance index data of the first interface and the performance index data of the second interface;
and determining the interface allocated by the flow message according to the interface flow ratio and the matched interface of the flow message.
7. The method for allocating interface of streaming message according to claim 6, wherein the determining the interface allocated to the streaming message according to the interface traffic ratio and the matching interface of the streaming message specifically comprises:
and inputting the interface flow ratio and the matched interface of the flow message into an interface distribution model, and outputting the interface distributed by the flow message by the interface distribution model.
8. A streaming message interface assignment arrangement, the arrangement comprising:
an attribute obtaining module, configured to obtain a stream message attribute in response to entry of a stream message, where the stream message attribute is all attributes of the stream message;
the interface query module is used for querying a first interface and a second interface and acquiring a first attribute and a second attribute, wherein the first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface;
the interface matching module is used for comparing the stream message attribute, the first attribute and the second attribute and determining a matching interface of the stream message;
a performance determining module, configured to obtain performance index data of the first interface and performance index data of the second interface;
and the interface allocation module is used for determining the interface allocated by the flow message according to the performance index data of the first interface, the performance index data of the second interface and the matched interface of the flow message.
9. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method of stream message interface allocation according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of stream message interface allocation according to any one of claims 1 to 7.
CN202211111860.3A 2022-09-13 2022-09-13 Stream message interface distribution method and related equipment Pending CN115543651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211111860.3A CN115543651A (en) 2022-09-13 2022-09-13 Stream message interface distribution method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211111860.3A CN115543651A (en) 2022-09-13 2022-09-13 Stream message interface distribution method and related equipment

Publications (1)

Publication Number Publication Date
CN115543651A true CN115543651A (en) 2022-12-30

Family

ID=84726651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211111860.3A Pending CN115543651A (en) 2022-09-13 2022-09-13 Stream message interface distribution method and related equipment

Country Status (1)

Country Link
CN (1) CN115543651A (en)

Similar Documents

Publication Publication Date Title
WO2021139438A1 (en) Big data resource processing method and apparatus, and terminal and storage medium
WO2018103595A1 (en) Authorization policy recommendation method and device, server, and storage medium
CN108052615B (en) Access request processing method, device, medium and electronic equipment
CN106959894B (en) Resource allocation method and device
CN112017042A (en) Resource quota determining method and device based on tweed distribution and electronic equipment
CN111985831A (en) Scheduling method and device of cloud computing resources, computer equipment and storage medium
CN116029391A (en) Model training method, prediction method and device based on federal learning
CN114356531A (en) Edge calculation task classification scheduling method based on K-means clustering and queuing theory
CN115543651A (en) Stream message interface distribution method and related equipment
CN111435381A (en) Request distribution method and device
CN111582649B (en) Risk assessment method and device based on user APP single-heat coding and electronic equipment
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN114020469A (en) Edge node-based multi-task learning method, device, medium and equipment
CN110633142B (en) Block chain consensus method, management node, electronic device, and storage medium
CN113762972A (en) Data storage control method and device, electronic equipment and storage medium
CN114332529A (en) Training method and device for image classification model, electronic equipment and storage medium
CN115550259B (en) Flow distribution method based on white list and related equipment
CN113778844A (en) Automatic performance testing method and device
CN115550270A (en) Interface flow distribution method and related equipment
CN115529281A (en) Flow distribution method and related equipment
CN113472551B (en) Network flow prediction method, device and storage medium
CN115550276A (en) Traffic discarding method based on parallel routing and related equipment
CN111050299B (en) Intelligent vehicle data mutual inspection method and device
CN106452863A (en) Resource allocation and prediction method and apparatus for information system
CN111404729B (en) Edge cloud cooperative system management method and device

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