Method for allocating stream message interface and related device

By acquiring streaming message attributes and interface performance metrics data, and combining them with historical feature data, the interface allocation process for streaming messages is optimized. This solves the problems of high cost and low accuracy in existing streaming message allocation technologies, and achieves more efficient interface matching and allocation.

CN115543651BActive Publication Date: 2026-06-02PING AN BANK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN BANK CO LTD
Filing Date
2022-09-13
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Current technologies for distributing streaming messages are costly and inaccurate, requiring significant manpower for physical screening.

Method used

By acquiring the attributes of the streaming message, querying and comparing the attributes of the first and second interfaces, and combining them with performance index data, the matching interface for the streaming message is determined, and the allocation process is optimized using historical feature data and the interface allocation model.

Benefits of technology

It simplifies the streaming message screening process, reduces costs, improves allocation accuracy, and enables streaming messages to be allocated to more suitable interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543651B_ABST
    Figure CN115543651B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a stream message interface allocation method and related equipment. The stream message interface allocation method comprises: in response to the entry of a stream message, obtaining stream message attributes, which are all attributes of the stream message; querying a first interface and a second interface to obtain first attributes and second attributes, the first attributes being all attributes of the first interface and the second attributes being all attributes of the second interface; comparing the stream message attributes, the first attributes and the second attributes to determine a matching interface of the stream message; obtaining performance index data of the first interface and performance index data of the second interface; and determining an interface to which the stream message is allocated according to the performance index data of the first interface, the performance index data of the second interface and the matching interface of the stream message. The technical solution of the embodiments of the present application is simpler and faster, reduces the screening cost and improves the accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer and communication technology, and more specifically, to a method for allocating a stream message interface and related equipment. Background Technology

[0002] In existing technologies, various issues in the distribution of streaming messages, such as whether various data streams conform to the format of the new interface and whether the new interface can be called normally, require a lot of manpower for physical screening. This method is costly and not very accurate. Summary of the Invention

[0003] The embodiments of this application provide a streaming message interface allocation method and related equipment, which can at least to some extent overcome the problems of high cost and low accuracy in the allocation of streaming messages in the prior art.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0005] According to one aspect of the embodiments of this application, a streaming message interface allocation method is provided, including:

[0006] In response to the arrival of a streaming message, the streaming message attributes are obtained, wherein the streaming message attributes are all the attributes of the streaming message;

[0007] Query the first interface and the second interface to obtain the first attribute and the second attribute. The first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.

[0008] By comparing the streaming message attributes, the first attribute, and the second attribute, the matching interface of the streaming message is determined;

[0009] Obtain the performance metrics data of the first interface and the performance metrics data of the second interface;

[0010] The interface for stream message allocation is determined based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the stream message.

[0011] In one embodiment of this application, the step of comparing the streaming message attributes, the first attribute, and the second attribute to determine the matching interface of the streaming message specifically includes:

[0012] If the streaming message attribute does not contain any of the attributes in the first attribute, then the matching interface of the streaming message is the second interface;

[0013] If the streaming message attribute contains all the attributes of the first attribute and the second attribute, then the attribute value of the streaming message attribute is compared with the attribute value of the first attribute to determine the matching interface of the streaming message.

[0014] In one embodiment of this application, if the streaming message attribute includes all attributes of the first attribute and the second attribute, then 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 includes:

[0015] If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is above a predetermined proportion threshold, then the matching interface of the streaming message is the first interface and the second interface.

[0016] If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is below a predetermined proportion threshold, then historical feature data is acquired, compared with the streaming message, and the matching interface of the streaming message is determined.

[0017] In one embodiment of this application, if the proportion of the attribute values ​​of the streaming message attribute being identical to the attribute values ​​of the first attribute is below a predetermined proportion threshold, then historical feature data is acquired, compared with the streaming message, and the matching interface of the streaming message is determined. This specifically includes:

[0018] Historical feature data is obtained and compared with the streaming message to obtain a historical score;

[0019] If the historical score is greater than a predetermined historical score threshold, then the matching interface for the streaming message is the first interface and the second interface;

[0020] If the historical score is less than a predetermined historical score threshold, the streaming message attribute is sent to the client, and the client determines the matching interface of the streaming message.

[0021] In one embodiment of this application, the step of obtaining historical feature data and comparing it with the streaming message to obtain a historical score specifically includes:

[0022] The historical feature data and the streaming message are input into the historical scoring model, and the historical scoring model outputs the historical score.

[0023] In one embodiment of this application, determining the interface for stream message allocation based on the performance metrics data of the first interface, the performance metrics data of the second interface, and the matching interface for the stream message specifically includes:

[0024] The interface traffic ratio is determined based on the performance index data of the first interface and the performance index data of the second interface.

[0025] The interface to which the stream message is allocated is determined based on the interface traffic ratio and the matching interface of the stream message.

[0026] In one embodiment of this application, determining the interface for stream message allocation based on the interface traffic ratio and the matching interface of the stream message specifically includes:

[0027] The interface traffic ratio and the matching interface of the stream message are input into the interface allocation model, and the interface allocation model outputs the interface to which the stream message is allocated.

[0028] According to one aspect of the embodiments of this application, a streaming message interface allocation device is provided. The streaming message interface allocation device includes:

[0029] The attribute acquisition module is used to acquire the attributes of the stream message in response to the arrival of the stream message. The stream message attributes are all the attributes of the stream message.

[0030] The interface query module is used to query the first interface and the second interface, and obtain the first attribute and the second attribute. The first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.

[0031] An interface matching module is used to compare the stream message attributes, the first attribute, and the second attribute to determine the matching interface of the stream message;

[0032] A performance determination module is used to obtain performance indicator data of the first interface and performance indicator data of the second interface;

[0033] The interface allocation module is used to determine the interface to which the streaming message is allocated based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the streaming message.

[0034] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the stream message interface allocation method as described in the above embodiments.

[0035] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and 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 streaming message interface allocation method as described in the above embodiments.

[0036] In some embodiments of this application, the technical solutions provide that determine the interface for matching the streaming message by comparing the streaming message attributes, the first attribute, and the second attribute. This method is simpler and faster than physical screening, reduces screening costs, and improves accuracy. Furthermore, by allocating streaming messages based on the performance metrics of each interface and the matching interface, the streaming messages can be assigned to more suitable interfaces, thus improving the accuracy of streaming message allocation.

[0037] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0039] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.

[0040] Figure 2 A flowchart illustrating a streaming message interface allocation method according to an embodiment of this application is shown schematically.

[0041] Figure 3 It is based on Figure 2 A flowchart illustrating a specific implementation of step S300 in the corresponding embodiment of the stream message interface allocation method.

[0042] Figure 4 It is based on Figure 3 A flowchart illustrating a specific implementation of step S320 in the corresponding embodiment of the stream message interface allocation method.

[0043] Figure 5 It is based on Figure 4 A flowchart illustrating a specific implementation of step S322 in the corresponding embodiment of the stream message interface allocation method.

[0044] Figure 6 It is based on Figure 2 A flowchart illustrating a specific implementation of step S500 in the corresponding embodiment of the stream message interface allocation method.

[0045] Figure 7 A block diagram of a streaming message interface allocation apparatus according to an embodiment of this application is shown schematically.

[0046] Figure 8 The structure of a computer system suitable for implementing the electronic devices of the present application is shown. Detailed Implementation

[0047] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0048] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0050] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0051] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.

[0052] like Figure 1 As shown, the system architecture may include terminal devices (such as...) Figure 1 The device shown includes one or more of a smartphone 101, tablet 102, and portable computer 103 (which could also be a desktop computer, etc.), a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal device and the server 105. The network 104 can include various connection types, such as wired communication links, wireless communication links, etc.

[0053] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, and servers. For example, server 105 could be a server cluster composed of multiple servers.

[0054] Users can interact with server 105 via network 104 using terminal devices to receive or send messages, etc. Server 105 can be a server providing various services. For example, a user uploads streaming message attributes to server 105 using terminal device 103 (or terminal device 101 or 102). Server 105 can, in response to the arrival of the streaming message, obtain the streaming message attributes, which are all attributes of the streaming message; 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; compare the streaming message attributes, the first attribute, and the second attribute to determine the matching interface for the streaming message; obtain performance index data of the first interface and the second interface; and determine the interface to which the streaming message is assigned based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface for the streaming message.

[0055] It should be noted that the streaming message interface allocation method provided in this application embodiment is generally executed by server 105, and correspondingly, the streaming message interface allocation device is generally located in server 105. However, in other embodiments of this application, the terminal device may also have similar functions to the server, thereby executing the streaming message interface allocation scheme provided in this application embodiment.

[0056] The implementation details of the technical solutions in the embodiments of this application are described in detail below:

[0057] Figure 2 A flowchart of a streaming message interface allocation method according to an embodiment of this application is shown. This streaming message interface allocation method can be executed by a server, which may be... Figure 1 The server shown. (Refer to...) Figure 2 As shown, the streaming message interface allocation method includes at least the following:

[0058] Step S100: In response to the arrival of a streaming message, obtain the streaming message attributes, which are all the attributes of the streaming message.

[0059] Step S200: Query the first interface and the second interface to obtain the first attribute and the second attribute. The first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.

[0060] Step S300: Compare the stream message attributes, the first attribute, and the second attribute to determine the matching interface of the stream message.

[0061] Step S400: Obtain the performance index data of the first interface and the performance index data of the second interface.

[0062] Step S500: Determine the interface for stream message allocation based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the stream message.

[0063] In the embodiments of this application, the attributes of the streaming message, a first attribute, and a second attribute are first obtained. Then, attribute comparison is performed to determine the interface that the streaming message can match, i.e., the matching interface. Next, the performance index data of each interface is obtained. Based on the performance index data and the matching interface, the interface to which the streaming message is allocated is determined. Compared with physical screening methods, the embodiments of this application are simpler and faster, reducing screening costs and improving accuracy. At the same time, by allocating streaming messages based on the performance index data of each interface and the matching interface of the streaming message, the streaming message can be assigned to a more suitable interface, improving the accuracy of streaming message allocation.

[0064] In step S100, the stream message attributes are all the attributes of the stream message, including user ID, service ID, timestamp, message format, valid data, invalid data, etc.

[0065] In step S200, the first attribute and the second attribute are obtained by sending query stream messages to the first interface and the second interface respectively, and then receiving the second stream messages returned by the first interface and the second interface respectively. The first attribute and the second attribute are obtained by parsing the returned stream messages.

[0066] In step S300, the stream message attributes are compared with the first attribute and the second attribute respectively, and the matching interface is determined based on the comparison results. The specific determination process can be found in the following embodiment.

[0067] Specifically, in some embodiments, the specific implementation of step S300 can be found in [reference needed]. Figure 3 . Figure 3 It is based on Figure 2 According to the detailed description of step S300 in the corresponding embodiment of the streaming message interface allocation method, step S300 may include the following steps:

[0068] Step S310: If the stream message attribute does not contain any of the attributes in the first attribute, then the matching interface of the stream message is the second interface.

[0069] Step S320: If the stream message attribute contains all the attributes of the first attribute and the second attribute, then the attribute value of the stream message attribute is compared with the attribute value of the first attribute to determine the matching interface of the stream message.

[0070] In this embodiment, if the stream message attribute does not contain all the attributes of the first attribute, it proves that the stream message cannot match the first interface, and the matching interface of the stream message is the second interface; if the stream message attribute contains all the attributes of the first attribute and the second attribute, it proves that the stream message initially matches the first interface and the second interface, and it is necessary to further compare the attribute values ​​to determine the matching interface, that is, to compare the attribute value of the stream message attribute with the attribute value of the first attribute to determine the matching interface of the stream message. The specific determination process can be referred to in the following embodiment.

[0071] Specifically, in some embodiments, the specific implementation of step S320 can be found in [reference needed]. Figure 4 . Figure 4 It is based on Figure 3 According to the detailed description of step S320 in the corresponding embodiment of the streaming message interface allocation method, step S320 may include the following steps:

[0072] Step S321: If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is above a predetermined proportion threshold, then the matching interface of the streaming message is the first interface and the second interface.

[0073] Step S322: If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is below a predetermined proportion threshold, then historical feature data is obtained, compared with the streaming message, and the matching interface of the streaming message is determined.

[0074] In this embodiment, if the proportion of the same attribute value of the streaming message attribute and the same attribute value of the first attribute is above a predetermined proportion threshold, it proves that the streaming message matches both the first interface and the second interface. In this case, the matching interface of the streaming message is the first interface and the second interface. If the proportion of the same attribute value of the streaming message attribute and the same attribute value of the first attribute is below a predetermined proportion threshold, it proves that the matching degree between the streaming message and the first interface is not high. It is necessary to further confirm whether the matching requirements are met, that is, to obtain historical feature data, compare it with the streaming message, and determine the matching interface of the streaming message.

[0075] Specifically, in some embodiments, the specific implementation of step S322 can be found in [reference needed]. Figure 5 . Figure 5 It is based on Figure 4According to the detailed description of step S322 in the corresponding embodiment of the streaming message interface allocation method, step S322 may include the following steps:

[0076] Step S3221: Obtain historical feature data and compare it with the streaming message to obtain a historical score.

[0077] Step S3222: If the historical score is greater than a predetermined historical score threshold, then the matching interface for the streaming message is the first interface and the second interface.

[0078] Step S3223: If the historical score is less than a predetermined historical score threshold, the streaming message attribute is sent to the client, and the client determines the matching interface of the streaming message.

[0079] In this embodiment, historical feature data is first acquired and compared with the streaming message to obtain a historical score. The historical feature data includes historical decision data and historical access data, that is, it includes previous decision data on the streaming message and previous access data of the streaming message. If the historical score is greater than a predetermined historical score threshold, it proves that in the previous decision and operation, the streaming message can be assigned to the first interface and the second interface. At this time, the matching interface of the streaming message is the first interface and the second interface. If the historical score is less than the predetermined historical score threshold, it proves that the streaming message will generally not be assigned to the first interface. At this time, client assistance is required for judgment. The streaming message attributes are sent to the client, and the client judges the matching interface of the streaming message. On the client, the judgment can be made automatically by the client program or manually. This application does not limit this.

[0080] In some embodiments, the determination of historical scores can be carried out with reference to the following example. In this embodiment, the specific steps for determining historical scores include:

[0081] The historical feature data and the streaming message are input into the historical scoring model, and the historical scoring model outputs the historical score.

[0082] In this embodiment, historical feature data and streaming messages can be organized into a historical rating vector with multiple dimensions. Then, the historical rating vector is input into the historical rating model, and the historical rating model outputs the historical rating.

[0083] Specifically, the training method for the historical scoring model includes: obtaining a set of historical scoring vector samples, wherein each historical scoring vector sample is pre-labeled with a corresponding historical score; inputting the data of each historical scoring vector sample into the historical scoring model to obtain the historical score output by the process strategy; if the historical score obtained after inputting the data of a historical scoring vector sample into the historical scoring model is inconsistent with the historical score pre-labeled for the historical scoring vector sample, then adjusting the coefficients of the process strategy until they are consistent; when the historical score obtained after inputting the data of all historical scoring vector samples into the historical scoring model is consistent with the historical score pre-labeled for the historical scoring vector sample, the training ends.

[0084] In step S400, the performance metrics data may include Queries Per Second (QPS), Transactions Per Second (TPS), processing time of tasks, remaining resources, etc., which can display the remaining performance of the interface from different dimensions.

[0085] In step S500, the ratio of traffic allocation to the two interfaces can be determined based on the performance index data of the first interface and the performance index data of the second interface, so as to control the traffic allocation at the macro level and avoid traffic congestion. At the same time, based on the matching interface of the streaming message, the interface to which the streaming message can flow can be determined, so as to control the traffic allocation at the micro level and avoid the streaming message flowing to the mismatched interface.

[0086] Specifically, in some embodiments, the specific implementation of step S500 can be found in [reference needed]. Figure 6 . Figure 6 It is based on Figure 2 In the detailed description of step S400 in the corresponding embodiment of the streaming message interface allocation method, step S500 may include the following steps:

[0087] Step S510: Determine the interface traffic ratio based on the performance index data of the first interface and the performance index data of the second interface.

[0088] Step S520: Determine the interface to which the stream message is allocated based on the interface traffic ratio and the matching interface of the stream message.

[0089] In this embodiment, the ratio of traffic allocated to the two interfaces is first determined based on the performance index data of the first interface and the performance index data of the second interface; then, the interface for the flow message allocation is determined based on the interface traffic ratio and the matching interface of the flow message.

[0090] In step S510, the interface traffic ratio can be determined by first determining the remaining performance of each interface based on the performance index data of each interface, and then determining the traffic allocation ratio based on the remaining performance of each interface.

[0091] The remaining performance can be determined based on the query per second (QPS), transaction per second (TPS), processing time, and remaining resources of the first and second interfaces. Generally speaking, the higher the QPS, TPS, and processing time, the less remaining performance there is, and the more remaining resources there are, the more remaining performance there is. That is, the remaining performance is negatively correlated with QPS, TPS, and processing time, and positively correlated with remaining resources.

[0092] In step S520, the allocation of interfaces can be based on the matching degree between the streaming messages and the interfaces. Priorities can be listed for the allocation of streaming messages, and interfaces can be allocated according to the priorities. Alternatively, interfaces can be allocated according to the allocation model.

[0093] Specifically, in some embodiments, the allocation of interfaces may include the following steps:

[0094] The interface traffic ratio and the matching interface of the stream message are input into the interface allocation model, and the interface allocation model outputs the interface to which the stream message is allocated.

[0095] In this embodiment, the interface traffic ratio and the matching interface of the streaming message can be first organized into an interface allocation vector, and then the organized interface allocation vector can be input into the interface allocation model, which outputs the interface allocated to the streaming message.

[0096] Specifically, the training method for the interface allocation vector sample model includes: obtaining an interface allocation vector sample set, wherein each interface allocation vector sample is pre-labeled with the corresponding interface for the flow message allocation; inputting the data of each interface allocation vector sample into the interface allocation vector sample model to obtain the interface for the flow message allocation output by the process strategy; if the interface allocation vector sample data is input into the interface allocation vector sample model and the obtained interface for the flow message allocation is inconsistent with the interface for the flow message allocation pre-labeled for the interface allocation vector sample, then adjusting the coefficients of the process strategy until they are consistent; when the interface allocation vector sample data is input into the interface allocation vector sample model and the obtained interface for the flow message allocation is consistent with the interface for the flow message allocation pre-labeled for the interface allocation vector sample, the training ends.

[0097] The following describes an apparatus embodiment of this application, which can be used to execute the streaming message interface allocation method in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the streaming message interface allocation method described above.

[0098] Figure 7 A block diagram of a streaming message interface allocation apparatus according to an embodiment of this application is shown.

[0099] Reference Figure 7 As shown, a streaming message interface allocation apparatus 900 according to an embodiment of this application includes:

[0100] The attribute acquisition module 910 is used to acquire the attributes of the stream message in response to the arrival of the stream message, wherein the stream message attributes are all the attributes of the stream message.

[0101] The interface query module 920 is used to query the first interface and the second interface, and obtain the first attribute and the second attribute. The first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface.

[0102] The interface matching module 930 is used to compare the stream message attributes, the first attribute, and the second attribute to determine the matching interface of the stream message.

[0103] The performance determination module 940 is used to obtain the performance index data of the first interface and the performance index data of the second interface.

[0104] The interface allocation module 950 is used to determine the interface to which the stream message is allocated based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the stream message.

[0105] The implementation process of the functions and roles of each module in the above device is detailed in the implementation process of the corresponding steps in the above-mentioned stream message interface allocation method, and will not be repeated here.

[0106] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0107] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0108] Figure 8 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.

[0109] It should be noted that, Figure 8 The computer system of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0110] like Figure 8 As shown, the computer system includes a Central Processing Unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1802 or programs loaded from storage portion 1808 into Random Access Memory (RAM) 1803, such as performing the methods described in the above embodiments. The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An Input / Output (I / O) interface 1805 is also connected to the bus 1804.

[0111] The following components are connected to I / O interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to I / O interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1810 as needed so that computer programs read from them can be installed into storage section 1808 as needed.

[0112] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit (CPU) 1801, it performs various functions defined in the system of this application.

[0113] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0115] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0116] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0117] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0118] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0119] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0120] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for allocating streaming message interfaces, characterized in that, The stream message interface allocation method includes: In response to the arrival of a streaming message, the streaming message attributes are obtained, wherein the streaming message attributes are all the attributes of the streaming message; Query the first interface and the second interface to obtain the first attribute and the second attribute. The first attribute is all attributes of the first interface, and the second attribute is all attributes of the second interface. If the streaming message attribute does not contain any of the attributes in the first attribute, then the matching interface of the streaming message is the second interface; If the streaming message attribute contains all the attributes of the first attribute and the second attribute, then the attribute value of the streaming message attribute is compared with the attribute value of the first attribute to determine the matching interface of the streaming message. Obtain the performance metrics data of the first interface and the performance metrics data of the second interface; Based on the performance metrics data of the first interface, the performance metrics data of the second interface, and the matching interface of the streaming message, the interface for the streaming message allocation is determined. Wherein, if the streaming message attribute contains all attributes of the first attribute and the second attribute, then the attribute value of the streaming message attribute is compared 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 including: If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is above a predetermined proportion threshold, then the matching interface of the streaming message is the first interface and the second interface. If the proportion of the attribute values ​​of the streaming message attribute and the attribute values ​​of the first attribute being the same is below a predetermined proportion threshold, then the historical feature data of the streaming message is obtained and compared with the streaming message to obtain a historical score; if the historical score is greater than a predetermined historical score threshold, then the matching interface of the streaming message is the first interface and the second interface; if the historical score is less than the predetermined historical score threshold, then the streaming message attribute is sent to the client, and the client determines the matching interface of the streaming message.

2. The streaming message interface allocation method as described in claim 1, characterized in that, Obtain historical feature data of the streaming message, compare it with the streaming message, and obtain a historical score, specifically including: The historical feature data and the streaming message are input into the historical scoring model, and the historical scoring model outputs the historical score.

3. The streaming message interface allocation method as described in claim 1, characterized in that, The step of determining the interface for stream message allocation based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface for the stream message specifically includes: The interface traffic ratio is determined based on the performance index data of the first interface and the performance index data of the second interface. The interface to which the stream message is allocated is determined based on the interface traffic ratio and the matching interface of the stream message.

4. The streaming message interface allocation method as described in claim 3, characterized in that, The step of determining the interface for stream message allocation based on the interface traffic ratio and the matching interface of the stream message specifically includes: The interface traffic ratio and the matching interface of the stream message are input into the interface allocation model, and the interface allocation model outputs the interface to which the stream message is allocated.

5. A stream message interface allocation device, characterized in that, The streaming message interface allocation device includes: The attribute acquisition module is used to acquire the attributes of the stream message in response to the arrival of the stream message. The stream message attributes are all the attributes of the stream message. The interface query module is used to query the first interface and the second interface, and obtain the first attribute and the second attribute. 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 is used to determine the matching interface of a streaming message if the streaming message attribute does not contain any of the attributes in the first attribute; and to compare the attribute value of the streaming message attribute with the attribute value of the first attribute to determine the matching interface of the streaming message if the streaming message attribute contains all the attributes in the first and second attributes. A performance determination module is used to obtain performance indicator data of the first interface and performance indicator data of the second interface; The interface allocation module is used to determine the interface for the stream message allocation based on the performance index data of the first interface, the performance index data of the second interface, and the matching interface of the stream message. The interface matching module is used to perform: If the proportion of the attribute values ​​of the streaming message attribute being the same as the attribute values ​​of the first attribute is above a predetermined proportion threshold, then the matching interface of the streaming message is the first interface and the second interface. If the proportion of the attribute values ​​of the streaming message attribute and the attribute values ​​of the first attribute being the same is below a predetermined proportion threshold, then the historical feature data of the streaming message is obtained and compared with the streaming message to obtain a historical score; if the historical score is greater than a predetermined historical score threshold, then the matching interface of the streaming message is the first interface and the second interface; if the historical score is less than the predetermined historical score threshold, then the streaming message attribute is sent to the client, and the client determines the matching interface of the streaming message.

6. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the streaming message interface allocation method as described in any one of claims 1 to 4.

7. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the streaming message interface allocation method as described in any one of claims 1 to 4.