A multi-cloud architecture-oriented request-level serialization protocol dynamic selection method, device, medium and equipment
Patent Information
- Application Number
- CN202611256700.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-09-22
AI Technical Summary
然而,不同业务请求的数据类型、数据长度、系统资源负载、安全要求和语言环境可能实时变化
[0023]本实施例,基于当前请求对应的系统安全要求等级和目标候选序列化协议对应的协议安全等级确定安全约束评分,使安全要求较高的业务通信请求适配安全等级更高的序列化协议,避免固定协议配置方式难以区分不同请求安全约束的问题,从而提高协议选择结果对请求安全需求的适配性。
Smart Images

Figure CN122802587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a method, apparatus, medium, and device for dynamically selecting request-level serialization protocols for multi-cloud architectures. Background Technology
[0002] With the development of digital transformation, multi-cloud architecture has become an important deployment method for cloud computing infrastructure. Existing multi-cloud platforms typically use a microservice architecture for inter-service communication and pre-configure fixed serialization protocols at the platform or service level. However, the data type, data length, system resource load, security requirements, and language environment of different business requests may change in real time. Fixed protocol configuration is difficult to adapt to these dynamic changes and can easily lead to decreased communication efficiency and increased resource consumption in high-concurrency and heterogeneous communication scenarios. Summary of the Invention
[0003] The purpose of this invention is to propose a method, apparatus, medium, and device for dynamic selection of request-level serialization protocols for multi-cloud architectures. By calling a preset multi-dimensional protocol knowledge base, dynamic scoring of protocol adaptation is performed on each candidate serialization protocol, and the candidate serialization protocol with the highest dynamic score is determined as the target serialization protocol, thereby improving the adaptability of the serialization protocol selection process to the current request characteristics and the current system state.
[0004] To achieve the above objectives, a first aspect of the present invention provides a method for dynamically selecting a request-level serialization protocol for a multi-cloud architecture, the method comprising: Receive business communication requests sent by the request initiator, and respond to the business communication requests by collecting request-level decision data; Based on the request-level decision data, a preset multi-dimensional protocol knowledge base is invoked to perform dynamic protocol adaptation scoring on each candidate serialization protocol, wherein the dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol under multiple protocol adaptation dimensions. The candidate serialization protocol with the highest dynamic score for protocol adaptation is determined as the target serialization protocol.
[0005] In this embodiment, a preset multi-dimensional protocol knowledge base is invoked to perform dynamic scoring on the protocol adaptation of each candidate serialization protocol, and the serialization protocol that matches the actual state of the current business communication request is selected based on the scoring results, thereby improving the adaptability of the serialization protocol to the current request characteristics and the current system state.
[0006] Furthermore, the preset multi-dimensional protocol knowledge base includes a protocol execution benchmark time library, a protocol readability coefficient library, a protocol resource efficiency coefficient library, a system security requirement library, a protocol security level library, and a protocol compatibility library. Then, the step of dynamically scoring the protocol adaptation of each candidate serialization protocol based on the request-level decision data by calling the preset multi-dimensional protocol knowledge base includes: Based on the serializable feature data in the request-level decision data, the data feature scores corresponding to each candidate serialization protocol are determined from the protocol execution benchmark time library and the protocol readability coefficient library. Based on the system resource load data in the request-level decision data, the resource status score corresponding to each candidate serialization protocol is determined from the protocol resource efficiency coefficient library; Based on the request security constraint data in the request-level decision data, the security constraint score corresponding to each candidate serialization protocol is determined from the system security requirement library and the protocol security level library. Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility score corresponding to each candidate serialization protocol is determined from the protocol compatibility library. Based on the data feature score, resource status score, security constraint score, language compatibility score, and dynamic weight of each candidate serialization protocol, the protocol adaptation dynamic score of each candidate serialization protocol is determined.
[0007] In this embodiment, the scores of candidate serialization protocols are determined from multiple protocol adaptation dimensions such as data characteristics, resource status, security constraints, and language compatibility. By considering the influence of multiple factors on the selection of serialization protocols, the accuracy and effectiveness of the comprehensive evaluation results of candidate serialization protocols are improved.
[0008] Further, the step of determining the data feature score corresponding to each candidate serialization protocol from the protocol execution benchmark time library and the protocol readability coefficient library based on the serializable feature data in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the data type in the feature data to be serialized, the serialization time benchmark and deserialization time benchmark corresponding to the target candidate serialization protocol are queried from the protocol execution benchmark time library. Based on the serialization time benchmark and deserialization time benchmark corresponding to each candidate serialization protocol in the candidate serialization protocol set, the maximum execution time benchmark is determined. Based on the serialization time benchmark, deserialization time benchmark, and the maximum execution time benchmark corresponding to the target candidate serialization protocol, the time adaptation score of the target candidate serialization protocol is determined. Based on the readability requirement information in the feature data to be serialized, the protocol readability coefficient corresponding to the target candidate serialization protocol is queried from the protocol readability coefficient library; Based on the protocol readability coefficient and the time adaptation score, the data feature score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the data feature score corresponding to each candidate serialization protocol is obtained.
[0009] In this embodiment, the time adaptation score of the target candidate serialization protocol is determined based on the data type, and the data feature score is determined by combining the protocol readability coefficient. At the same time, the processing efficiency and readability requirements of the data to be serialized are taken into account, avoiding the protocol selection bias caused by focusing only on execution speed or only on readability.
[0010] Furthermore, the protocol execution benchmark time library is updated through the following steps: Obtain protocol execution monitoring information corresponding to the target candidate serialization protocol; The protocol execution monitoring information is filtered for abnormal discrete data to determine whether the protocol execution monitoring information is normal data. If the protocol execution monitoring information is normal data, then base data is determined based on the protocol execution monitoring information; If the protocol execution monitoring information is abnormal data, then the protocol execution monitoring information is filtered or downgraded to obtain the filtered or downgraded baseline data. Based on the benchmark data, a new measurement time corresponding to the target candidate serialization protocol is determined; Based on the new measurement time and the historical reference time stored in the protocol execution reference time library, the protocol execution reference time corresponding to the target candidate serialization protocol is attenuated and calibrated to obtain the updated protocol execution reference time. The updated protocol execution reference time is written into the protocol execution reference time library.
[0011] In this embodiment, by acquiring protocol execution monitoring information and performing attenuation calibration on the protocol execution benchmark time based on the new measurement time and historical benchmark time, the protocol execution benchmark time library can be updated according to the actual operation, avoiding the problem of distorted scoring basis caused by the long-term fixation of historical benchmark time, thereby improving the real-time performance and reliability of the protocol execution benchmark time library.
[0012] Furthermore, the protocol readability coefficient library is established through the following steps: Obtain the global default readability configuration, service-level readability configuration, and interface-level readability configuration corresponding to each candidate serialization protocol; Based on the global default readability configuration, the service dimension readability configuration, and the interface dimension readability configuration, the target readability coefficients corresponding to each candidate serialization protocol are determined, and the protocol readability coefficient library is established based on the target readability coefficients corresponding to each candidate serialization protocol.
[0013] This embodiment transforms the readability requirements in different scenarios into quantifiable data, thereby improving the adaptability of the protocol readability coefficient library to the readability needs of different business scenarios.
[0014] Further, determining the target readability coefficient corresponding to each candidate serialization protocol includes: Choose any one of the candidate serialization protocols from the list of candidate serialization protocols as the target candidate serialization protocol; Determine whether the interface dimension readability configuration corresponding to the target candidate serialization protocol exists; If the interface-level readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the interface-level readability configuration. If the interface dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then determine whether the service dimension readability configuration corresponding to the target candidate serialization protocol exists. If the service dimension readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the service dimension readability configuration. If the service dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the global default readability configuration. Iterate through each candidate serialization protocol to obtain the target readability coefficient for each candidate serialization protocol.
[0015] In this embodiment, the target readability coefficient is determined in the order of interface-level readability configuration, service-level readability configuration, and global default readability configuration, so that interface-level readability requirements can be satisfied first when there are interface-level differentiated requirements.
[0016] Further, the step of determining the resource status score corresponding to each candidate serialization protocol from the protocol resource efficiency coefficient library based on the system resource load data in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data, determine the CPU load coefficient, memory load coefficient, and network bandwidth load coefficient of the current system. From the protocol resource efficiency coefficient library, query the CPU resource efficiency, memory resource efficiency, and network resource efficiency corresponding to the target candidate serialization protocol; Based on the CPU load coefficient and the CPU resource efficiency, determine the CPU resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the memory load coefficient and the memory resource efficiency, the memory resource adaptor score corresponding to the target candidate serialization protocol is determined; Based on the network bandwidth load coefficient and the network resource efficiency, determine the network resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the CPU resource adapter score, the memory resource adapter score, and the network resource adapter score, the resource status score corresponding to the target candidate serialization protocol is determined; Traverse each candidate serialization protocol in the candidate serialization protocol set to obtain the resource status score corresponding to each candidate serialization protocol.
[0017] In this embodiment, a resource status score is determined by combining multi-dimensional system resource-related data such as the current system's CPU load coefficient, memory load coefficient, network bandwidth load coefficient, and resource efficiency corresponding to the target candidate serialization protocol, so as to improve the accuracy of the resource status score.
[0018] Further, determining the CPU load factor, memory load factor, and network bandwidth load factor of the current system based on the system resource load data includes: Based on the current CPU utilization and the preset CPU full load utilization in the system resource load data, the CPU load coefficient corresponding to the current system is determined; Based on the current available memory and total system memory in the system resource load data, determine the memory load coefficient corresponding to the current system; Based on the current network bandwidth usage and total system network bandwidth in the system resource load data, the network bandwidth load coefficient corresponding to the current system is determined.
[0019] In this embodiment, the CPU load factor, memory load factor, and network bandwidth load factor are determined based on the current CPU utilization, current available memory, and current network bandwidth usage, respectively, providing a real-time and reliable basis for resource load assessment.
[0020] Further, the CPU resource efficiency, memory resource efficiency, and network resource efficiency are determined through the following steps: From the protocol resource efficiency coefficient library, query the CPU resource benchmark value corresponding to the target candidate serialization protocol, and based on the CPU resource benchmark value and the global CPU benchmark value in the CPU resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the CPU resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the memory resource benchmark value corresponding to the target candidate serialization protocol, and based on the memory resource benchmark value and the global memory benchmark value in the memory resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the memory resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the network transmission benchmark value corresponding to the target candidate serialization protocol, and based on the network transmission benchmark value and the network global benchmark value among the network transmission benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the network resource efficiency corresponding to the target candidate serialization protocol.
[0021] In this embodiment, by comparing the CPU resource benchmark value, memory resource benchmark value, and network transmission benchmark value corresponding to the target candidate serialization protocol with the corresponding global benchmark value, the relative resource efficiency of different candidate serialization protocols in the CPU, memory, and network dimensions can be quantified, thereby improving the comparability of resource consumption differences among different candidate serialization protocols.
[0022] Further, determining the security constraint score corresponding to each candidate serialization protocol from the system security requirement library and the protocol security level library includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the requested security constraint data, query the system security requirement level corresponding to the current request from the system security requirement database; Query the protocol security level corresponding to the target candidate serialization protocol from the protocol security level library; Based on the protocol security level corresponding to the target candidate serialization protocol and the system security requirement level corresponding to the current request, the security constraint score of the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the security constraint score corresponding to each candidate serialization protocol is obtained.
[0023] In this embodiment, a security constraint score is determined based on the system security requirement level corresponding to the current request and the protocol security level corresponding to the target candidate serialization protocol. This allows business communication requests with higher security requirements to be adapted to serialization protocols with higher security levels, avoiding the problem that fixed protocol configuration methods cannot distinguish the security constraints of different requests, thereby improving the adaptability of the protocol selection result to the security requirements of the request.
[0024] Further, the step of determining the language compatibility score corresponding to each candidate serialization protocol from the protocol compatibility library based on the language features of the communication to be serialized in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility coefficient of the target candidate serialization protocol is queried from the protocol compatibility library; Based on the language compatibility coefficient, the language compatibility score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, a language compatibility score is obtained for each candidate serialization protocol.
[0025] In this embodiment, the language compatibility coefficient of the target candidate serialization protocol is queried based on the characteristics of the communication language to be serialized, and the language compatibility score is determined based on the language compatibility coefficient to obtain the degree of compatibility between the candidate serialization protocol and the current communication language environment, thereby reducing the risk of increased parsing costs or communication failures caused by insufficient protocol compatibility between heterogeneous language systems.
[0026] Furthermore, the step of determining the protocol adaptation dynamic score of each candidate serialization protocol based on the data feature score, resource status score, security constraint score, language compatibility score, and dynamic weights corresponding to each score includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data and request security constraint data in the request-level decision data, determine the dynamic weights of data features, resource status, security constraints, and language compatibility. Based on the data feature scores corresponding to the target candidate serialization protocol and the dynamic weights of the data features, a weighted score for the data features is determined. Based on the resource status score corresponding to the target candidate serialization protocol and the dynamic weight of the resource status, a weighted score of resource status is determined; Based on the security constraint score corresponding to the target candidate serialization protocol and the dynamic weight of the security constraint, a weighted score for the security constraint is determined. Based on the language compatibility score corresponding to the target candidate serialization protocol and the dynamic weight of language compatibility, a weighted score for language compatibility is determined. Based on the weighted scores of the data features, the resource status, the security constraints, and the language compatibility, the dynamic protocol adaptation score of the target candidate serialization protocol is determined. By traversing through each candidate serialization protocol in the candidate serialization protocol set, a dynamic protocol adaptation score is obtained for each candidate serialization protocol.
[0027] In this embodiment, a dynamic score for protocol adaptation is determined based on the dynamic weights corresponding to data feature scores, resource status scores, security constraint scores, and language compatibility scores. This allows for adjustments to the influence of different scoring dimensions on the protocol selection process based on the current system resource load and request security constraints, avoiding the problem that fixed weights are difficult to adapt to changes in operating status and improving the dynamic adaptability of the target serialization protocol selection results.
[0028] To achieve the above objectives, a second aspect of the present invention further provides a request-level serialization protocol dynamic selection apparatus for multi-cloud architectures, used to implement the request-level serialization protocol dynamic selection method for multi-cloud architectures as described in any of the first aspects above, the apparatus comprising: The data acquisition module is used to receive business communication requests sent by the request initiator and, in response to the business communication requests, collect request-level decision data. The protocol scoring module is used to dynamically score the protocol adaptation of each candidate serialization protocol based on the request-level decision data and by calling a preset multi-dimensional protocol knowledge base. The dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol under multiple protocol adaptation dimensions. The protocol determination module is used to determine the candidate serialization protocol with the highest dynamic score of protocol adaptation as the target serialization protocol.
[0029] A third aspect of the present invention also provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the request-level serialization protocol dynamic selection method for multi-cloud architecture described in any of the first aspects above.
[0030] A fourth aspect of the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a request-level serialization protocol dynamic selection method for a multi-cloud architecture as described in any of the first aspects above. Attached Figure Description
[0031] Figure 1 This is a flowchart of a preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided by the first aspect of the present invention; Figure 2 This is a flowchart illustrating the protocol reference time feedback calibration of another preferred embodiment of the request-level serialization protocol dynamic selection method for multi-cloud architecture provided in the first aspect of the present invention. Figure 3 This is a flowchart illustrating the target readability coefficient acquisition of another preferred embodiment of the request-level serialization protocol dynamic selection method for multi-cloud architecture provided in the first aspect of the present invention. Figure 4 This is a flowchart illustrating the system security requirement level acquisition process of another preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided in the first aspect of the present invention. Figure 5 This is a flowchart illustrating the system security requirement level acquisition process of another preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided by the second aspect of the present invention. Figure 6 This is a structural block diagram of a preferred embodiment of a terminal device provided in the fourth aspect of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] It should be noted that the data involved in this invention (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0034] In this embodiment of the invention, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplarily" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0035] In this invention description, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In this invention description, unless otherwise stated, "a plurality of" means two or more. In this invention description, the term "comprising" and its variations are open-ended, meaning "including but not limited to." The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments."
[0036] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0037] In the description of this invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0038] The technical solution of the present invention will be further described below with reference to specific embodiments: The first aspect of this invention provides a method for dynamically selecting request-level serialization protocols for multi-cloud architectures, see [link to relevant documentation]. Figure 1 The diagram shown is a flowchart of a preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided by the first aspect of the present invention. The method includes steps S1 to S3, as follows: Step S1: Receive the business communication request sent by the request initiator, and in response to the business communication request, collect request-level decision data; The request initiator is a service initiator in a multi-cloud architecture, and the business communication request is a service invocation request or data communication request initiated by the service initiator to the target service. The request-level decision data is the basis for protocol selection corresponding to the current business communication request. The request-level decision data includes data-related information that needs to be serialized in the current business communication request and current system resource load data; in some embodiments, the request-level decision data also includes security level information and language compatibility-related information corresponding to the current business communication request.
[0039] In one example, when the gateway receives a business communication request sent by the service initiator, the real-time data acquisition module collects and processes the current business communication request to obtain information related to the data to be serialized and system resource load data corresponding to the current business communication request, which serves as the data basis for subsequent serialization protocol selection.
[0040] It should be noted that the request-level decision data in this embodiment is data collected for the current business communication request, rather than data pre-configured for the entire platform or the entire service. Therefore, it can reflect the real-time status corresponding to the current business communication request.
[0041] It is understandable that the data content, system resource status, security requirements, and language environment corresponding to different business communication requests may differ. Therefore, by collecting request-level decision data after receiving a business communication request, we can provide data basis for selecting a serialization protocol for the current business communication request.
[0042] In this embodiment, by collecting request-level decision data in response to business communication requests, the subsequent serialization protocol selection process has a request-level data foundation, avoiding reliance solely on fixed platform-level or service-level configurations for protocol selection, thereby improving the serialization protocol selection process's ability to perceive current business communication requests. Step S2: Based on the request-level decision data, a preset multi-dimensional protocol knowledge base is invoked to perform dynamic protocol adaptation scoring on each candidate serialization protocol, wherein the dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol across multiple protocol adaptation dimensions; The preset multi-dimensional protocol knowledge base stores knowledge base data for each candidate serialization protocol under different protocol adaptation dimensions. The candidate serialization protocols are those already added to the preset multi-dimensional protocol knowledge base. The multiple protocol adaptation dimensions may include data feature dimensions, resource status dimensions, security constraint dimensions, and language compatibility dimensions. The dynamic protocol adaptation score characterizes the overall degree of adaptation between the candidate serialization protocol and the current business communication request and the current system status.
[0043] In one example, the protocol selection module reads a preset multi-dimensional protocol knowledge base, obtains a set of candidate serialization protocols, and performs dynamic protocol adaptation scoring on each candidate serialization protocol in the set based on the request-level decision data collected in step S1, thereby obtaining the dynamic protocol adaptation score corresponding to each candidate serialization protocol.
[0044] It should be noted that this embodiment does not limit the specific types of candidate serialization protocols. Candidate serialization protocols can be serialization protocols that have been pre-added to a preset multi-dimensional protocol knowledge base, such as JSON, Protobuf, Hessian, etc.
[0045] It is understandable that different candidate serialization protocols may differ in terms of serialization processing efficiency, resource consumption, security support, and language compatibility. Therefore, by calling a pre-defined multi-dimensional protocol knowledge base to dynamically score the protocol adaptation of each candidate serialization protocol, the adaptation of different candidate serialization protocols under the current business communication request can be quantitatively evaluated.
[0046] In this embodiment, by calling a preset multi-dimensional protocol knowledge base based on request-level decision data to perform dynamic scoring on the protocol adaptation of each candidate serialization protocol, the degree of adaptation between different candidate serialization protocols and the current request characteristics and the current system state can be comprehensively evaluated, avoiding the problem of inaccurate adaptation results caused by selecting a serialization protocol based on only a single factor or fixed configuration.
[0047] Step S3: Determine the candidate serialization protocol with the highest dynamic score for protocol adaptation as the target serialization protocol.
[0048] The target serialization protocol is the serialization protocol selection result corresponding to the current business communication request. The target serialization protocol is used for subsequent protocol execution processes to serialize the data to be processed in the current business communication request.
[0049] In one example, after obtaining the dynamic protocol adaptation scores for each candidate serialization protocol, the protocol selection module compares the dynamic protocol adaptation scores and determines the candidate serialization protocol with the highest dynamic protocol adaptation score as the target serialization protocol for the current business communication request.
[0050] It should be noted that the target serialization protocol in this embodiment is determined based on the request-level decision data corresponding to the current business communication request. Therefore, different business communication requests determine different target serialization protocols according to their corresponding request-level decision data.
[0051] Understandably, once the target serialization protocol is determined, the protocol execution module serializes the data to be processed in the current business communication request based on the target serialization protocol to support subsequent inter-service communication processes.
[0052] In this embodiment, the candidate serialization protocol with the highest dynamic matching score is determined as the target serialization protocol. Under the current business communication request, the serialization protocol with a high degree of comprehensive matching is selected, which solves the problem that the fixed protocol configuration method is difficult to adapt to different requests and different system state changes.
[0053] In another preferred embodiment, the preset multidimensional protocol knowledge base includes a protocol execution benchmark time library, a protocol readability coefficient library, a protocol resource efficiency coefficient library, a system security requirement library, a protocol security level library, and a protocol compatibility library. Then, the step of dynamically scoring the protocol adaptation of each candidate serialization protocol based on the request-level decision data by calling the preset multidimensional protocol knowledge base includes: Based on the serializable feature data in the request-level decision data, the data feature scores corresponding to each candidate serialization protocol are determined from the protocol execution benchmark time library and the protocol readability coefficient library. Based on the system resource load data in the request-level decision data, the resource status score corresponding to each candidate serialization protocol is determined from the protocol resource efficiency coefficient library; Based on the request security constraint data in the request-level decision data, the security constraint score corresponding to each candidate serialization protocol is determined from the system security requirement library and the protocol security level library. Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility score corresponding to each candidate serialization protocol is determined from the protocol compatibility library. Based on the data feature score, resource status score, security constraint score, language compatibility score, and dynamic weight of each candidate serialization protocol, the protocol adaptation dynamic score of each candidate serialization protocol is determined.
[0054] The protocol execution benchmark time library stores serialization and deserialization time benchmarks for different candidate serialization protocols under different data types; the protocol readability coefficient library stores readability coefficients corresponding to different readability configurations; the protocol resource efficiency coefficient library stores resource efficiency data for different candidate serialization protocols in terms of CPU, memory, and network dimensions; the system security requirement library stores system security requirement levels corresponding to different requests, interfaces, or services; the protocol security level library stores protocol security levels corresponding to different candidate serialization protocols; and the protocol compatibility library stores compatibility data for different candidate serialization protocols to different communication language environments. The data feature score characterizes the degree of adaptation between the candidate serialization protocol and the current data to be serialized; the resource status score characterizes the degree of adaptation between the candidate serialization protocol and the current system resource load status; the security constraint score characterizes the degree of adaptation between the candidate serialization protocol and the security constraints of the current request; and the language compatibility score characterizes the degree of adaptation between the candidate serialization protocol and the current communication language environment.
[0055] In one example, the model aims to obtain real-time scores for each candidate serialization protocol at the request-level fine-grained scale, with the protocols adapting to dynamic scoring. S It can be represented as:
[0056] in, This is a correction factor for protocol compatibility. The dynamic weights corresponding to the i-th protocol adaptation dimension. ; For the first The dynamic score corresponds to each protocol adaptation dimension. The four protocol adaptation dimensions are data feature dimension, resource status dimension, security constraint dimension, and language compatibility dimension. The protocol compatibility correction coefficient... This is used to indicate whether the candidate serialization protocol is compatible with the locale of both communicating parties. If the candidate serialization protocol is compatible with the locale of both communicating parties, then... The value is 1; if the candidate serialization protocol is incompatible with the language environments of both communicating parties, then... The value is 0. That is, for candidate serialization protocols that are incompatible with the language environments of both communicating parties, their protocol adaptation dynamic score is 0.
[0057] It should be noted that the dynamic weights are used to characterize the importance of different protocol adaptation dimensions under the current business communication request. Since system resource load, request security constraints, and communication language environment may change with different business communication requests, the dynamic weights corresponding to different protocol adaptation dimensions can also be adjusted according to the current request state and the current system state.
[0058] It should be noted that the aforementioned protocol compatibility correction coefficient This is not entirely the same as the language compatibility score. The protocol compatibility correction coefficient... The language compatibility score is used to exclude candidate serialization protocols that do not support the language environment of both communicating parties at all; the language compatibility score is used to further evaluate the degree of language compatibility of candidate serialization protocols based on their ability to support the language environment of both communicating parties.
[0059] It is understandable that different candidate serialization protocols may differ in terms of data processing efficiency, resource consumption, security support capabilities, and cross-language adaptability. Therefore, by determining data feature scores, resource status scores, security constraint scores, and language compatibility scores respectively, and combining them with corresponding dynamic weights, a multi-dimensional comprehensive evaluation of candidate serialization protocols is conducted.
[0060] In this embodiment, a pre-defined multi-dimensional protocol knowledge base is established, including a protocol execution benchmark time library, a protocol readability coefficient library, a protocol resource efficiency coefficient library, a system security requirement library, a protocol security level library, and a protocol compatibility library. Based on request-level decision data, candidate serialization protocols are dynamically scored for protocol adaptation from multiple protocol adaptation dimensions such as data characteristics, resource status, security constraints, and language compatibility. This avoids the problem of one-sided adaptation results caused by selecting a serialization protocol based on only a single factor or fixed configuration, thereby improving the matching degree between the comprehensive evaluation result of candidate serialization protocols and the current request characteristics and the current system status.
[0061] In another preferred embodiment, the step of determining the data feature score corresponding to each candidate serialization protocol from the protocol execution benchmark time library and the protocol readability coefficient library based on the serializable feature data in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the data type in the feature data to be serialized, the serialization time benchmark and deserialization time benchmark corresponding to the target candidate serialization protocol are queried from the protocol execution benchmark time library. Based on the serialization time benchmark and deserialization time benchmark corresponding to each candidate serialization protocol in the candidate serialization protocol set, the maximum execution time benchmark is determined. Based on the serialization time benchmark, deserialization time benchmark, and the maximum execution time benchmark corresponding to the target candidate serialization protocol, the time adaptation score of the target candidate serialization protocol is determined. Based on the readability requirement information in the feature data to be serialized, the protocol readability coefficient corresponding to the target candidate serialization protocol is queried from the protocol readability coefficient library; Based on the protocol readability coefficient and the time adaptation score, the data feature score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the data feature score corresponding to each candidate serialization protocol is obtained.
[0062] The data type of the feature data to be serialized may include at least one of integer, string, array, and nested structure. The protocol execution benchmark time library stores the serialization time benchmark and deserialization time benchmark corresponding to each candidate serialization protocol under different data types. The serialization time benchmark is used to characterize the benchmark time consumed by the candidate serialization protocol when serializing data of the corresponding data type, and the deserialization time benchmark is used to characterize the benchmark time consumed by the candidate serialization protocol when deserializing data of the corresponding data type.
[0063] In one example, this embodiment, under the data feature dimension, comprehensively analyzes the data types that need to be serialized in the current business communication request, the serialization time bases and deserialization time bases corresponding to different candidate serialization protocols, and the protocol readability coefficient as references. The data feature score can be expressed as:
[0064] in, Score the data features. The serialization time base is the target candidate serialization protocol. The deserialization time base is the target candidate serialization protocol. Based on the maximum execution time, The readability coefficient is the corresponding protocol readability coefficient for the target candidate serialization protocol.
[0065] It should be noted that, and The smaller the value of 'e', the shorter the serialization and deserialization time of the target candidate serialization protocol under the current data type, and the higher the corresponding time adaptation score. This is achieved by introducing... This serves as a benchmark, making the time adaptation scores of different candidate serialization protocols comparable. Since different serialization protocols consume varying amounts of time when serializing and deserializing data from different data sources, a protocol execution benchmark time library based on data feature dimensions can be pre-established. Specifically, for a candidate serialization protocol to be added to the protocol knowledge base, multiple serialization and deserialization operations can be performed on data with different data structures using that candidate serialization protocol, and the corresponding serialization and deserialization time benchmarks for that candidate serialization protocol under different data types can be statistically obtained. The units of the serialization and deserialization time benchmarks can be μs / KB.
[0066] The maximum execution time benchmark serves as a reference for evaluating the time compatibility between candidate serialization protocols. Specifically, the maximum execution time benchmark can be determined based on the serialization and deserialization time benchmarks corresponding to each candidate serialization protocol in the candidate serialization protocol set under the current data type. By introducing the maximum execution time benchmark, the impact of differences in execution time values among different candidate serialization protocols on the scoring range can be reduced.
[0067] It should be noted that the time adaptation score is used to characterize the degree of execution efficiency adaptation of the target candidate serialization protocol under the current data type. Generally, the smaller the serialization time base and deserialization time base corresponding to the target candidate serialization protocol, the shorter the processing time of the target candidate serialization protocol under the current data type, and the higher its corresponding time adaptation score.
[0068] The readability requirement information is used to characterize the readability requirements of the current business communication request or the current interface for the serialization result. The protocol readability coefficient library is used to store the protocol readability coefficients corresponding to candidate serialization protocols, and these coefficients are used to quantify the readability of the serialization result corresponding to the candidate serialization protocol.
[0069] In one example, different serialization protocols exhibit varying degrees of readability. For instance, JSON, based on a plaintext key-value pair structure, facilitates system log debugging and direct user viewing, thus its protocol readability coefficient is relatively high. Protobuf, typically using binary encoding, results in serialized data that is not easily readable directly, leading to a relatively low protocol readability coefficient. For interfaces with high readability requirements, candidate serialization protocols with higher readability can achieve higher scores in data feature evaluation. Conversely, for intermediate data transmissions without manual reading requirements, the impact of readability factors on protocol selection can be reduced.
[0070] It is understandable that, since the serialization and deserialization time of the same candidate serialization protocol may be different under different data types, and the readability requirements of serialization results may also be different for different business communication requests, the degree of adaptation between each candidate serialization protocol and the current data to be serialized can be evaluated more accurately by calculating the data feature score of each candidate serialization protocol for the current data to be serialized.
[0071] In this embodiment, by querying the serialization time base and deserialization time base corresponding to the target candidate serialization protocol based on the data type in the feature data to be serialized, and combining the protocol readability coefficient to determine the data feature score, it is possible to simultaneously take into account the processing efficiency of the candidate serialization protocol for the current data type and the readability requirements of the current business communication request.
[0072] In another preferred embodiment, based on the above-mentioned determination of time adaptation score based on protocol execution benchmark time library, the method further includes updating the protocol execution benchmark time library. That is, the protocol execution benchmark time library in the above embodiments is not merely a statically preset database, but can be adjusted based on the actual execution of the target candidate serialization protocol to improve the accuracy of subsequent time adaptation scores. Specifically, the protocol execution benchmark time library is updated through the following steps: Obtain protocol execution monitoring information corresponding to the target candidate serialization protocol; The protocol execution monitoring information is filtered for abnormal discrete data to determine whether the protocol execution monitoring information is normal data. If the protocol execution monitoring information is normal data, then base data is determined based on the protocol execution monitoring information; If the protocol execution monitoring information is abnormal data, then the protocol execution monitoring information is filtered or downgraded to obtain the filtered or downgraded baseline data. Based on the benchmark data, a new measurement time corresponding to the target candidate serialization protocol is determined; Based on the new measurement time and the historical reference time stored in the protocol execution reference time library, the protocol execution reference time corresponding to the target candidate serialization protocol is attenuated and calibrated to obtain the updated protocol execution reference time. The updated protocol execution reference time is written into the protocol execution reference time library.
[0073] The protocol execution monitoring information refers to the actual execution information collected and returned by the execution monitoring module when the protocol execution module performs serialization and / or deserialization processing using the target candidate serialization protocol. The protocol execution monitoring information may include at least one of the following: actual serialization time, actual deserialization time, data length, and corresponding data type. The new measurement time is used to characterize the actual running reference time obtained based on the protocol execution monitoring information; the historical reference time is the currently enabled reference time in the protocol execution reference time library.
[0074] In one example, see Figure 2 The diagram shown is a flowchart of a protocol reference time feedback calibration process, representing another preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architectures provided by the first aspect of this invention. After the execution monitoring module returns protocol execution monitoring information, it first filters the protocol execution monitoring information for abnormal discrete data. If the protocol execution monitoring information is normal data, reference data is obtained based on this normal data. If the protocol execution monitoring information is abnormal data, the abnormal data is filtered or downgraded to obtain filtered or downgraded reference data. Subsequently, a new measurement time is obtained based on the reference data, and an updated protocol execution reference time is obtained through attenuation calibration. Finally, the updated protocol execution reference time is written into the protocol execution reference time library.
[0075] In one example, the protocol execution base time can be attenuated and calibrated using the following formula: Current reference time = Attenuation factor × New measurement time + (1 - Attenuation factor) × Historical reference time The attenuation factor is a configurable parameter, ranging from 0.1 to 0.3, used to control the degree of influence of the new measurement time on the current reference time. A larger attenuation factor results in a greater impact of the new measurement time on the updated protocol execution reference time; a smaller attenuation factor results in a greater impact of the historical reference time on the updated protocol execution reference time.
[0076] It should be noted that, to prevent occasional abnormal data from affecting the accuracy of the protocol execution reference time library, this embodiment performs abnormal discrete data filtering on the protocol execution monitoring information before attenuation calibration. Specifically, it can be determined whether the new measurement time falls within a preset valid range. The preset valid range can be [0.5 × historical reference time, 2 × historical reference time]. This set of thresholds is based on the empirical distribution of common time reference deviations. Normal measurement deviations basically follow an approximately exponential distribution. The vast majority (more than 95%) of normal single measurement deviations will fall within the range of "0.5 to 2 times the historical reference." Values exceeding this range are likely completely abnormal values caused by occasional interference. If the new measurement time falls within the preset valid range, the protocol execution monitoring information corresponding to the new measurement time is determined to be normal data. If the new measurement time does not fall within the preset valid range, the protocol execution monitoring information corresponding to the new measurement time is determined to be abnormal data. When the new measurement time exceeds the preset valid range, the new measurement time may not be directly included in the update process of the protocol execution reference time to avoid unreasonable impacts on the reference time caused by occasional jitter, instantaneous resource contention, or monitoring errors.
[0077] In one example, if a new measurement time exceeds the preset valid range multiple times consecutively, a degradation process can be triggered. Specifically, if a new measurement time exceeds the preset valid range five times consecutively, the product of the historical maximum value and a preset relaxation coefficient is used as the filtered or downgraded new measurement time. For example, the historical maximum value × 1.2 (this coefficient is set based on engineering experience with risk mitigation; multiplying by 1.2 is a slight relaxation of the upper limit of the threshold: it can accept new measurement values that have already drifted, avoiding complete failure to update the baseline; it also avoids excessive relaxation, preventing serious outliers from being mixed into the calculation) can be used as the filtered or downgraded new measurement time. This allows for moderate updates to the baseline time when the protocol execution performance undergoes continuous changes, while preventing serious outliers from directly entering the baseline time calculation process.
[0078] Understandably, the actual execution time of the same candidate serialization protocol may change as the system operating environment, resource load, and business request types change under a multi-cloud architecture. Therefore, by feeding back actual execution data through the execution monitoring module and calibrating the protocol execution benchmark time by attenuation, the protocol execution benchmark time library can gradually reflect the execution status of the target candidate serialization protocol in the current operating environment.
[0079] In this embodiment, by filtering abnormal discrete data from the protocol execution monitoring information and combining the new measurement time with the historical reference time to perform attenuation calibration on the protocol execution reference time, the interference of abnormal monitoring data can be reduced while the protocol execution reference time library is updated with the actual operation, thereby improving the real-time performance and stability of the protocol execution reference time library, and thus improving the accuracy of subsequent time adaptation scoring based on the protocol execution reference time library.
[0080] In another preferred embodiment, based on the above-mentioned determination of time adaptation scores based on the protocol execution benchmark time library, this embodiment further provides a quantitative basis for data feature scoring from a readability perspective. Specifically, the protocol readability coefficient library is established through the following steps: Obtain the global default readability configuration, service-level readability configuration, and interface-level readability configuration corresponding to each candidate serialization protocol; Based on the global default readability configuration, the service dimension readability configuration, and the interface dimension readability configuration, the target readability coefficients corresponding to each candidate serialization protocol are determined, and the protocol readability coefficient library is established based on the target readability coefficients corresponding to each candidate serialization protocol.
[0081] The global default readability configuration represents the default readability requirements adopted by the system when no service-level or interface-level readability configurations are set. The service-level readability configuration represents the readability requirements within a specified service scope. The interface-level readability configuration represents the readability requirements corresponding to a specified interface or request path. The target readability coefficient represents the quantification result of the readability of the current candidate serialization protocol in the current business communication request scenario, and the target readability coefficient can be used as an influence parameter for subsequently determining the data feature score.
[0082] Further, determining the target readability coefficient corresponding to each candidate serialization protocol includes: Choose any one of the candidate serialization protocols from the list of candidate serialization protocols as the target candidate serialization protocol; Determine whether the interface dimension readability configuration corresponding to the target candidate serialization protocol exists; If the interface-level readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the interface-level readability configuration. If the interface dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then determine whether the service dimension readability configuration corresponding to the target candidate serialization protocol exists. If the service dimension readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the service dimension readability configuration. If the service dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the global default readability configuration. Iterate through each candidate serialization protocol to obtain the target readability coefficient for each candidate serialization protocol.
[0083] In one example, since different serialization protocols have varying degrees of readability, a protocol readability coefficient library can be established to differentiate readability requirements for different interfaces, services, or business scenarios. For instance, higher readability requirements can be configured for business communication requests that require log output, debugging analysis, or manual review; lower readability requirements can be configured for intermediate transmission data that is determined not to require manual reading. See details... Figure 3 The diagram shown is a flowchart illustrating the target readability coefficient acquisition process of another preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided by the first aspect of the present invention. After starting to acquire the readability coefficient, it first determines whether an interface-level readability configuration exists; if an interface-level readability configuration exists, the interface-level readability coefficient is used as the final readability coefficient; if an interface-level readability configuration does not exist, it continues to determine whether a service-wide readability configuration exists; if a service-wide readability configuration exists, the service-wide readability coefficient is used as the final readability coefficient; if a service-wide readability configuration does not exist, the global default readability coefficient is used as the final readability coefficient, and the final readability coefficient is output.
[0084] It should be noted that the interface-level readability configuration has a higher priority than the service-level readability configuration, and the service-level readability configuration has a higher priority than the global default readability configuration. Therefore, when the same business communication request hits multiple readability configurations simultaneously, the more granular readability configuration will be used preferentially.
[0085] Understandably, different candidate serialization protocols exhibit varying levels of readability. For instance, JSON, based on a plaintext key-value pair structure, facilitates log debugging and manual review, thus exhibiting high readability. Protobuf, typically employing binary encoding, results in serialized data that is not easily readable directly, leading to relatively lower readability. By establishing corresponding readability coefficients for candidate serialization protocols, the differences in readability between protocols can be transformed into quantifiable data that can be used in scoring calculations.
[0086] In this embodiment, the target readability coefficients corresponding to each candidate serialization protocol are determined based on the global default readability configuration, service-dimensional readability configuration, and interface-dimensional readability configuration, and a protocol readability coefficient library is established, thereby improving the adaptability between the subsequent target serialization protocol selection results and the current business scenario.
[0087] In another preferred embodiment, determining the resource status score corresponding to each candidate serialization protocol from the protocol resource efficiency coefficient library based on the system resource load data in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data, determine the CPU load coefficient, memory load coefficient, and network bandwidth load coefficient of the current system. From the protocol resource efficiency coefficient library, query the CPU resource efficiency, memory resource efficiency, and network resource efficiency corresponding to the target candidate serialization protocol; Based on the CPU load coefficient and the CPU resource efficiency, determine the CPU resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the memory load coefficient and the memory resource efficiency, the memory resource adaptor score corresponding to the target candidate serialization protocol is determined; Based on the network bandwidth load coefficient and the network resource efficiency, determine the network resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the CPU resource adapter score, the memory resource adapter score, and the network resource adapter score, the resource status score corresponding to the target candidate serialization protocol is determined; Traverse each candidate serialization protocol in the candidate serialization protocol set to obtain the resource status score corresponding to each candidate serialization protocol.
[0088] The system resource load data characterizes the resource usage status of the current system when performing serialization protocol selection. The system resource load data may include at least one of the following: current CPU utilization, current available memory, total system memory, current network bandwidth usage, and total system network bandwidth. The protocol resource efficiency coefficient library stores resource efficiency data for each candidate serialization protocol in terms of CPU, memory, and network dimensions. CPU resource efficiency characterizes the relative efficiency of the target candidate serialization protocol in terms of CPU resource consumption; memory resource efficiency characterizes the relative efficiency of the target candidate serialization protocol in terms of memory resource consumption; and network resource efficiency characterizes the relative efficiency of the target candidate serialization protocol in terms of network transmission.
[0089] In one example, the resource status score can be represented as:
[0090] in, Score the resource status. This is a CPU utilization penalty item. This is a memory usage penalty item. This is a network bandwidth adjustment item. The CPU resource efficiency corresponding to the target candidate serialization protocol. The memory resource efficiency corresponding to the target candidate serialization protocol. The network resource efficiency corresponding to the target candidate serialization protocol.
[0091] Different serialization protocols vary in compression efficiency, CPU consumption, memory consumption, and network transmission efficiency. Generally, protocols with higher compression efficiency may increase CPU and memory consumption but reduce network transmission pressure; protocols with lower compression efficiency may reduce encoding computation pressure but increase network transmission volume. Therefore, when determining resource status scores, multiple resource dimensions such as CPU, memory, and network need to be considered comprehensively.
[0092] It should be noted that the CPU resource adaptability score, memory resource adaptability score, and network resource adaptability score can be determined by their respective load coefficients and resource efficiency. The higher the load of the current system in a certain resource dimension, the more significant the impact of that resource dimension on the resource status score, thus enabling the resource status score to reflect the degree of adaptation of the target candidate serialization protocol to the current system resource state.
[0093] Understandably, when CPU load is high, the system tends to lower the score of protocols that consume a lot of CPU; when memory usage is high, the system tends to lower the score of protocols that consume a lot of memory; and when network bandwidth is limited, the system tends to consider the resource efficiency of protocols in network transmission. Therefore, the resource status score can change with the current system load.
[0094] In this embodiment, by combining the current system's CPU load coefficient, memory load coefficient, network bandwidth load coefficient, and the CPU resource efficiency, memory resource efficiency, and network resource efficiency corresponding to the target candidate serialization protocol, a resource status score is determined, which can quantify the degree of adaptation between different candidate serialization protocols and the current system resource status.
[0095] In yet another preferred embodiment, determining the CPU load factor, memory load factor, and network bandwidth load factor of the current system based on the system resource load data includes: Based on the current CPU utilization and the preset CPU full load utilization in the system resource load data, the CPU load coefficient corresponding to the current system is determined; Based on the current available memory and total system memory in the system resource load data, determine the memory load coefficient corresponding to the current system; Based on the current network bandwidth usage and total system network bandwidth in the system resource load data, the network bandwidth load coefficient corresponding to the current system is determined.
[0096] The current CPU utilization rate characterizes the current CPU resource occupancy level of the system, while the preset CPU full load utilization rate characterizes the utilization rate corresponding to full CPU resource load. The CPU load coefficient can be used to calculate the CPU utilization penalty. .
[0097] In one example, when the current system CPU utilization is C, if C is less than 66.7%, it indicates that CPU resources are relatively sufficient, and a CPU utilization penalty is applied. It can be represented as:
[0098] If C is greater than or equal to 66.7%, it indicates that CPU resources are relatively strained, and candidate serialization protocols with high CPU consumption need to be penalized more severely. (CPU utilization penalty item) It can be represented as:
[0099] In one example, the memory load coefficient is used to characterize the current system memory resource occupancy status. If the system resource load data includes the current memory usage value... Total system memory Then the memory usage penalty term R2 can be expressed as:
[0100] It should be noted that if the system resource load data collects the current available memory, the current memory usage value can be determined based on the total system memory and the current available memory, and then the memory load coefficient or memory usage penalty item can be further determined.
[0101] In one example, the network bandwidth load factor is used to characterize the current network bandwidth usage status of the system. If the current bandwidth usage value is... The total system bandwidth is Then the network bandwidth adjustment term R3 can be expressed as:
[0102] It should be noted that the CPU load factor, memory load factor, and network bandwidth load factor are all determined based on real-time collected system resource load data, and therefore reflect the current system resource status rather than the static configuration status of the system.
[0103] It is understandable that the system may be in different resource load states when different business communication requests arrive. By determining the CPU load factor, memory load factor, and network bandwidth load factor in real time, the resource status score can be adjusted according to changes in current system resources, thereby avoiding the use of the same resource evaluation criteria under different load states.
[0104] In this embodiment, the CPU load coefficient, memory load coefficient, and network bandwidth load coefficient are determined based on the current CPU utilization, current available memory, and current network bandwidth usage, respectively. This quantifies the current system resource status and provides a real-time resource load basis for resource status scoring, thereby improving the ability of the serialization protocol selection process to perceive changes in system resources.
[0105] In yet another preferred embodiment, the CPU resource efficiency, the memory resource efficiency, and the network resource efficiency are determined through the following steps: From the protocol resource efficiency coefficient library, query the CPU resource benchmark value corresponding to the target candidate serialization protocol, and based on the CPU resource benchmark value and the global CPU benchmark value in the CPU resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the CPU resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the memory resource benchmark value corresponding to the target candidate serialization protocol, and based on the memory resource benchmark value and the global memory benchmark value in the memory resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the memory resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the network transmission benchmark value corresponding to the target candidate serialization protocol, and based on the network transmission benchmark value and the network global benchmark value among the network transmission benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the network resource efficiency corresponding to the target candidate serialization protocol.
[0106] The CPU resource benchmark value is used to characterize the resource consumption benchmark of the candidate serialization protocol in the CPU dimension; the memory resource benchmark value is used to characterize the resource consumption benchmark of the candidate serialization protocol in the memory dimension; and the network transmission benchmark value is used to characterize the transmission resource benchmark of the candidate serialization protocol in the network dimension.
[0107] In one example, since different serialization protocols consume different system resources during serialization and deserialization, protocol resource efficiency can be determined using protocol resource efficiency coefficient analysis. Protocol resource efficiency can be expressed as:
[0108] in, To define the protocol resource efficiency of the target candidate serialization protocol under resource dimension r, the protocol baseline r is the resource baseline value of the target candidate serialization protocol under resource dimension r, and the global baseline r is the global baseline value of the candidate serialization protocol set under resource dimension r. The protocol baseline value with the highest resource consumption in the candidate serialization protocol set is determined as the global baseline value, so that the protocol resource efficiency value ranges between 0 and 1.
[0109] In one example, the protocol baseline data can be found in Table 1: Table 1: Example Table of Protocol Baseline Data
[0110] Taking CPU as an example, the CPU baseline value of 23.1 for JSON can be used as the global CPU baseline value. Then the CPU resource efficiency of Protobuf is 12.5 / 23.1=0.54, the CPU resource efficiency of JSON is 23.1 / 23.1=1, and the CPU resource efficiency of Avro is 18.7 / 23.1=0.81.
[0111] It should be noted that the aforementioned protocol resource efficiency coefficient library can be established by performing serialization and deserialization tests on different candidate serialization protocols under the same conditions. By statistically analyzing the resource consumption of different candidate serialization protocols in terms of CPU, memory, and network dimensions, the protocol baseline data corresponding to each candidate serialization protocol can be obtained, and the corresponding resource efficiency can be further determined.
[0112] Understandably, the CPU, memory, and network resource efficiencies of candidate serialization protocols can reflect the differences in resource consumption between different protocols. By comparing the resource benchmark values of the target candidate serialization protocol with the corresponding global benchmark values, different candidate serialization protocols can be made comparable under the same resource dimension.
[0113] In this embodiment, by determining the CPU resource efficiency, memory resource efficiency, and network resource efficiency based on the CPU resource benchmark value, memory resource benchmark value, network transmission benchmark value, and corresponding global benchmark value corresponding to the target candidate serialization protocol, the relative resource consumption differences of different candidate serialization protocols in the CPU, memory, and network dimensions can be quantified.
[0114] In yet another preferred embodiment, determining the security constraint score corresponding to each candidate serialization protocol from the system security requirement library and the protocol security level library includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the requested security constraint data, query the system security requirement level corresponding to the current request from the system security requirement database; Query the protocol security level corresponding to the target candidate serialization protocol from the protocol security level library; Based on the protocol security level corresponding to the target candidate serialization protocol and the system security requirement level corresponding to the current request, the security constraint score of the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the security constraint score corresponding to each candidate serialization protocol is obtained.
[0115] The request security constraint data is used to characterize the security requirements corresponding to the current business communication request, the current interface, or the current service. The system security requirement library stores the system security requirement levels corresponding to different systems, services, or request-level interfaces, and the protocol security level library stores the protocol security levels corresponding to different candidate serialization protocols. The system security requirement level characterizes the minimum security requirements of the current request for the serialization protocol, and the protocol security level characterizes the degree to which the candidate serialization protocol itself supports data security, transmission security, and deserialization security.
[0116] In one example, since different serialization protocols offer varying levels of security support, the protocol's own security level can be used as an influencing factor, provided the protocol meets the basic security requirements of the current request. This allows candidate serialization protocols with higher security levels to obtain higher security constraint scores. The security constraint score can be expressed as:
[0117] in, The protocol security level corresponding to the target candidate serialization protocol. This represents the system security requirement level corresponding to the current request. This scoring method is used to characterize the degree to which the protocol security level meets the system security requirement level; the greater the difference between the protocol security level and the system security requirement level, the higher the corresponding security constraint score.
[0118] In one example, to quantify the security levels of different serialization protocols, a protocol security level library can be established based on dimensions such as data security, transmission security, and deserialization security. See Table 2, which shows the protocol security levels of some candidate serialization protocols: Table 2: Example Data for Protocol Security Level Library
[0119] The comprehensive rating can be used as the security level of the candidate serialization protocol. The comprehensive rating can range from 1 to 5, with a higher value indicating a higher security level for the corresponding candidate serialization protocol.
[0120] In one example, the system security requirement library stores the system security requirement levels corresponding to the current system, current service, or current request-level interface, and determines the system security requirement level corresponding to the current request based on preset security level configuration priorities. The protocol security level library can be established based on preliminary technical research and expert evaluation. Specifically, the system security requirement library includes a global default security level configuration, service-dimensional security level configurations, and interface-dimensional security level configurations. The global default security level configuration represents the default security requirements adopted by the system when no service-dimensional or interface-dimensional security levels are configured; the service-dimensional security level configuration represents the security requirements within a specified service scope; and the interface-dimensional security level configuration represents the security requirements corresponding to a specified interface or a specified request path.
[0121] In one example, see Figure 4 The diagram shown is a flowchart illustrating the system security requirement level acquisition process of another preferred embodiment of a request-level serialization protocol dynamic selection method for multi-cloud architecture provided by the first aspect of the present invention. After starting to acquire the security level, the system first determines whether an interface-level security level configuration exists. If an interface-level security level configuration exists, it is adopted as the final security level. If an interface-level security level configuration does not exist, the system continues to determine whether a service-wide security level configuration exists. If a service-wide security level configuration exists, it is adopted as the final security level. If a service-wide security level configuration does not exist, the global default security level is adopted as the final security level, and the final security level is output.
[0122] In one example, a higher security level can be configured for business communication requests involving the transmission of sensitive information; a lower security level can be configured for publicly available information or non-sensitive information transmitted internally and not exposed. Therefore, the corresponding system security requirement level can be determined based on the security requirements of different business communication requests, different interfaces, or different services.
[0123] Understandably, different services and even different request-level interfaces may have different security level requirements under different business conditions. If only a uniform global security level configuration is used, it is difficult to accurately express the security differences between different requests. However, by using a hierarchical configuration approach that includes interface-level security level configuration, service-level security level configuration, and global default security level configuration, the system security requirement level corresponding to the current request can be made more closely aligned with the actual business scenario.
[0124] Understandably, the security level configuration in the system security requirements library can be adjusted according to business needs. The adjusted security level configuration can be updated to the protocol knowledge base and affect the security constraint scores of subsequent candidate serialization protocols.
[0125] It is understandable that different business communication requests may have different security constraints, and the same candidate serialization protocol may also exhibit different degrees of adaptability to different security requirement scenarios. Therefore, by simultaneously querying the system security requirement level corresponding to the current request and the protocol security level corresponding to the target candidate serialization protocol, it is possible to determine whether the target candidate serialization protocol is suitable for the security constraints of the current request.
[0126] In this embodiment, by determining the security constraint score based on the system security requirement level corresponding to the current request and the protocol security level corresponding to the target candidate serialization protocol, the security requirements on the request side and the security capabilities on the protocol side can be quantitatively matched, so that business communication requests with higher security requirements can be preferentially adapted to serialization protocols with higher security levels, thereby improving the adaptability of the target serialization protocol selection result to the security constraints of the current request.
[0127] In another preferred embodiment, the step of determining the language compatibility score corresponding to each candidate serialization protocol from the protocol compatibility library based on the language features of the communication to be serialized in the request-level decision data includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility coefficient of the target candidate serialization protocol is queried from the protocol compatibility library; Based on the language compatibility coefficient, the language compatibility score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, a language compatibility score is obtained for each candidate serialization protocol.
[0128] The communication language features to be serialized are used to characterize the language environments of the two communicating parties corresponding to the current business communication request. The language environments of the two communicating parties may include the programming language environment corresponding to the request initiator and the programming language environment corresponding to the request receiver. The protocol compatibility library is used to store compatibility data of different candidate serialization protocols for different programming language environments. The language compatibility coefficient is used to characterize the degree of compatibility between the target candidate serialization protocol and the current communication language environment.
[0129] In one example, based on the aforementioned overall compatibility veto system, the language compatibility score is used to further evaluate the compatibility of candidate serialization protocols with the current communication language environment. Specifically, the language compatibility score can be determined using the following formula:
[0130] in, The language compatibility coefficient is obtained from the protocol compatibility library. The value ranges from 0 to 1. The higher the language compatibility coefficient, the better the compatibility between the target candidate serialization protocol and the current communication language environment, and the higher the corresponding language compatibility score.
[0131] It should be noted that different serialization protocols may have varying degrees of support for different programming languages. For example, some serialization protocols have mature toolchains and lower cross-language adaptation costs in multi-language environments, thus having a high language compatibility coefficient; while some serialization protocols may only be adapted to specific languages or frameworks, with higher adaptation costs in heterogeneous language environments, thus having a lower language compatibility coefficient.
[0132] In this embodiment, by querying the language compatibility coefficient of the target candidate serialization protocol from the protocol compatibility library based on the characteristics of the communication language to be serialized, and determining the language compatibility score based on the language compatibility coefficient, the compatibility degree between the candidate serialization protocol and the current communication language environment can be transformed into quantitative data that can participate in the dynamic scoring of protocol adaptation. This reduces the risk of increased parsing costs or communication failures caused by insufficient protocol compatibility between heterogeneous language systems, and improves the adaptability of the target serialization protocol in multi-cloud heterogeneous communication scenarios.
[0133] In another preferred embodiment, determining the protocol adaptation dynamic score of each candidate serialization protocol based on the data feature score, resource status score, security constraint score, language compatibility score, and dynamic weights corresponding to each score includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data and request security constraint data in the request-level decision data, determine the dynamic weights of data features, resource status, security constraints, and language compatibility. Based on the data feature scores corresponding to the target candidate serialization protocol and the dynamic weights of the data features, a weighted score for the data features is determined. Based on the resource status score corresponding to the target candidate serialization protocol and the dynamic weight of the resource status, a weighted score of resource status is determined; Based on the security constraint score corresponding to the target candidate serialization protocol and the dynamic weight of the security constraint, a weighted score for the security constraint is determined. Based on the language compatibility score corresponding to the target candidate serialization protocol and the dynamic weight of language compatibility, a weighted score for language compatibility is determined. Based on the weighted scores of the data features, the resource status, the security constraints, and the language compatibility, the dynamic protocol adaptation score of the target candidate serialization protocol is determined. By traversing through each candidate serialization protocol in the candidate serialization protocol set, a dynamic protocol adaptation score is obtained for each candidate serialization protocol.
[0134] The dynamic weights of the data features are used to characterize the influence of data feature scores on protocol adaptation dynamic scores; the dynamic weights of the resource status are used to characterize the influence of resource status scores on protocol adaptation dynamic scores; the dynamic weights of the security constraints are used to characterize the influence of security constraint scores on protocol adaptation dynamic scores; and the dynamic weights of the language compatibility are used to characterize the influence of language compatibility scores on protocol adaptation dynamic scores. The system resource load data may include the current system CPU utilization rate.
[0135] In one example, the original dynamic weights corresponding to the four protocol adaptation dimensions can be determined first, and then the original dynamic weights can be normalized to obtain the final dynamic weights used in the protocol adaptation dynamic scoring calculation. The normalization process can be expressed as:
[0136] in, The normalized dynamic weights for the i-th protocol adaptation dimension are such that, through normalization, the sum of the dynamic weights for the four protocol adaptation dimensions is equal to 1.
[0137] In one example, the original dynamic weights corresponding to the data feature dimensions. It can be represented as:
[0138] Here, the current system CPU utilization is normalized and represented as C, with the value of C ranging from 0 to 1. When the CPU utilization is low, it indicates that the system resources are relatively sufficient. At this time, the influence of the data feature dimension can be increased to pay more attention to serialization and deserialization performance. When the CPU utilization increases, the original dynamic weight of the data feature dimension is reduced to reduce the dependence on the simple execution efficiency dimension.
[0139] In one example, the original dynamic weights corresponding to the resource state dimension. It can be represented as:
[0140] in, This is an emergency degradation parameter. When C is greater than 0.8, The value is 0.25; when C is not greater than 0.8, The value is set to 0. Therefore, when the CPU load is high, the influence of the resource status dimension on the dynamic scoring of protocol adaptation can be increased, making the protocol selection process pay more attention to candidate serialization protocols with lower resource consumption.
[0141] In one example, the original dynamic weights corresponding to the security constraint dimension. It can be represented as:
[0142] Here, I is the security constraint enhancement parameter. When C is greater than 0.8, I takes the value of 1.0; when C is not greater than 0.8, I takes the value of 0.0. Therefore, when the system is under high load, the weight corresponding to the security constraint dimension can be increased, so that the protocol selection process can still take into account the security constraints of the current request in resource-constrained scenarios.
[0143] In one example, the original dynamic weights corresponding to the language compatibility dimension. It can be represented as:
[0144] in, This is the language compatibility coefficient read from the protocol compatibility library. By setting a lower limit of 0.05, the language compatibility dimension can be prevented from being completely ignored in the dynamic scoring of protocol adaptation.
[0145] It should be noted that the dynamic weighting of language compatibility does not conflict with the aforementioned overall compatibility veto system. The overall compatibility veto system is used to exclude candidate serialization protocols that are completely incompatible with the current communication language environment; the dynamic weighting of language compatibility is used to further adjust the influence of language compatibility score on protocol adaptation dynamic score, provided that the candidate serialization protocols have basic compatibility.
[0146] In one example, the dynamic protocol adaptation score of the target candidate serialization protocol can be obtained by summing four weighted scores. Specifically, the dynamic protocol adaptation score can be the sum of a data feature-weighted score, a resource state-weighted score, a security constraint-weighted score, and a language compatibility-weighted score. The data feature-weighted score can be obtained by multiplying the data feature score by its dynamic weight; the resource state-weighted score can be obtained by multiplying the resource state score by its dynamic weight; the security constraint-weighted score can be obtained by multiplying the security constraint score by its dynamic weight; and the language compatibility-weighted score can be obtained by multiplying the language compatibility score by its dynamic weight.
[0147] Understandably, the importance of each protocol adaptation dimension varies under different system load conditions. For example, when CPU load is low, more attention can be paid to the serialization processing efficiency under the data feature dimension; when CPU load is high, more attention can be paid to the resource status dimension to avoid selecting candidate serialization protocols with high resource consumption; when the language environments of the communicating parties are significantly different, the impact of the language compatibility dimension on the dynamic score of protocol adaptation can be increased.
[0148] It is understandable that, compared to a fixed-weight scoring method, the dynamic weight in this embodiment can be adjusted based on the current system resource load data and request security constraint data, so that the dynamic scoring of protocol adaptation can more accurately reflect the importance of different dimensions of the current business communication request and the current system state.
[0149] In this embodiment, dynamic weights for data features, resource status, security constraints, and language compatibility are determined based on system resource load data and request security constraint data. Protocol adaptation dynamic scores are determined based on the scores of each dimension and their corresponding dynamic weights. The influence of each scoring dimension can be dynamically adjusted according to the current system resource load status and current request security requirements, avoiding the problem that fixed weights or fixed rules are difficult to adapt to changes in the operating state, thereby improving the dynamic adaptation capability of the target serialization protocol selection result.
[0150] A second aspect of this invention provides a request-level serialization protocol dynamic selection apparatus for multi-cloud architectures, used to implement the request-level serialization protocol dynamic selection method for multi-cloud architectures described in any of the first aspects above. See also... Figure 5 The diagram shown is a structural block diagram of a preferred embodiment of a request-level serialization protocol dynamic selection device for multi-cloud architecture provided by the second aspect of the present invention. The device includes: The data acquisition module 11 is used to receive business communication requests sent by the request initiator and, in response to the business communication requests, collect request-level decision data. The protocol scoring module 12 is used to call a preset multi-dimensional protocol knowledge base to perform dynamic protocol adaptation scoring on each candidate serialization protocol based on the request-level decision data, wherein the dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol under multiple protocol adaptation dimensions. Protocol determination module 13 is used to determine the candidate serialization protocol with the highest protocol adaptation dynamic score as the target serialization protocol.
[0151] Preferably, the preset multi-dimensional protocol knowledge base includes a protocol execution benchmark time library, a protocol readability coefficient library, a protocol resource efficiency coefficient library, a system security requirement library, a protocol security level library, and a protocol compatibility library. Then, the protocol scoring module 12 specifically includes: The first protocol scoring unit is used to determine the data feature score corresponding to each candidate serialization protocol from the protocol execution benchmark time library and the protocol readability coefficient library based on the serializable feature data to be serialized in the request-level decision data. The second protocol scoring unit is used to determine the resource status score corresponding to each candidate serialization protocol from the protocol resource efficiency coefficient library based on the system resource load data in the request-level decision data. The third protocol scoring unit is used to determine the security constraint score corresponding to each candidate serialization protocol from the system security requirement library and the protocol security level library based on the request security constraint data in the request-level decision data. The fourth protocol scoring unit is used to determine the language compatibility score corresponding to each candidate serialization protocol from the protocol compatibility library based on the language features of the communication to be serialized in the request-level decision data. The fifth protocol scoring unit is used to determine the protocol adaptation dynamic score of each candidate serialization protocol based on the data feature score, resource status score, security constraint score, language compatibility score and dynamic weight corresponding to each score.
[0152] Preferably, the first protocol scoring unit is used to determine the data feature score corresponding to each candidate serialization protocol through the following steps: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the data type in the feature data to be serialized, the serialization time benchmark and deserialization time benchmark corresponding to the target candidate serialization protocol are queried from the protocol execution benchmark time library. Based on the serialization time benchmark and deserialization time benchmark corresponding to each candidate serialization protocol in the candidate serialization protocol set, the maximum execution time benchmark is determined. Based on the serialization time benchmark, deserialization time benchmark, and the maximum execution time benchmark corresponding to the target candidate serialization protocol, the time adaptation score of the target candidate serialization protocol is determined. Based on the readability requirement information in the feature data to be serialized, the protocol readability coefficient corresponding to the target candidate serialization protocol is queried from the protocol readability coefficient library; Based on the protocol readability coefficient and the time adaptation score, the data feature score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the data feature score corresponding to each candidate serialization protocol is obtained.
[0153] Preferably, the first protocol scoring unit further includes a protocol execution benchmark time library update subunit, which is used to update the protocol execution benchmark time library through the following steps: Obtain protocol execution monitoring information corresponding to the target candidate serialization protocol; The protocol execution monitoring information is filtered for abnormal discrete data to determine whether the protocol execution monitoring information is normal data. If the protocol execution monitoring information is normal data, then base data is determined based on the protocol execution monitoring information; If the protocol execution monitoring information is abnormal data, then the protocol execution monitoring information is filtered or downgraded to obtain the filtered or downgraded baseline data. Based on the benchmark data, a new measurement time corresponding to the target candidate serialization protocol is determined; Based on the new measurement time and the historical reference time stored in the protocol execution reference time library, the protocol execution reference time corresponding to the target candidate serialization protocol is attenuated and calibrated to obtain the updated protocol execution reference time. The updated protocol execution reference time is written into the protocol execution reference time library.
[0154] Preferably, the first protocol scoring unit further includes a protocol readability coefficient library establishment subunit, which is used to establish the protocol readability coefficient library through the following steps: Obtain the global default readability configuration, service-level readability configuration, and interface-level readability configuration corresponding to each candidate serialization protocol; Based on the global default readability configuration, the service dimension readability configuration, and the interface dimension readability configuration, the target readability coefficients corresponding to each candidate serialization protocol are determined, and the protocol readability coefficient library is established based on the target readability coefficients corresponding to each candidate serialization protocol.
[0155] Preferably, the protocol readability coefficient library establishment subunit is further used to determine the target readability coefficient corresponding to each candidate serialization protocol through the following steps: Choose any one of the candidate serialization protocols from the list of candidate serialization protocols as the target candidate serialization protocol; Determine whether the interface dimension readability configuration corresponding to the target candidate serialization protocol exists; If the interface-level readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the interface-level readability configuration. If the interface dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then determine whether the service dimension readability configuration corresponding to the target candidate serialization protocol exists. If the service dimension readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the service dimension readability configuration. If the service dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the global default readability configuration. Iterate through each candidate serialization protocol to obtain the target readability coefficient for each candidate serialization protocol.
[0156] Preferably, the second protocol scoring unit is used to determine the resource status score corresponding to each candidate serialization protocol through the following steps: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data, determine the CPU load coefficient, memory load coefficient, and network bandwidth load coefficient of the current system. From the protocol resource efficiency coefficient library, query the CPU resource efficiency, memory resource efficiency, and network resource efficiency corresponding to the target candidate serialization protocol; Based on the CPU load coefficient and the CPU resource efficiency, determine the CPU resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the memory load coefficient and the memory resource efficiency, the memory resource adaptor score corresponding to the target candidate serialization protocol is determined; Based on the network bandwidth load coefficient and the network resource efficiency, determine the network resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the CPU resource adapter score, the memory resource adapter score, and the network resource adapter score, the resource status score corresponding to the target candidate serialization protocol is determined; Traverse each candidate serialization protocol in the candidate serialization protocol set to obtain the resource status score corresponding to each candidate serialization protocol.
[0157] Preferably, the third protocol scoring unit is used to determine the CPU load factor, memory load factor, and network bandwidth load factor of the current system through the following steps: Based on the current CPU utilization and the preset CPU full load utilization in the system resource load data, the CPU load coefficient corresponding to the current system is determined; Based on the current available memory and total system memory in the system resource load data, determine the memory load coefficient corresponding to the current system; Based on the current network bandwidth usage and total system network bandwidth in the system resource load data, the network bandwidth load coefficient corresponding to the current system is determined.
[0158] Preferably, the third protocol scoring unit is further configured to determine the CPU resource efficiency, the memory resource efficiency, and the network resource efficiency through the following steps: From the protocol resource efficiency coefficient library, query the CPU resource benchmark value corresponding to the target candidate serialization protocol, and based on the CPU resource benchmark value and the global CPU benchmark value in the CPU resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the CPU resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the memory resource benchmark value corresponding to the target candidate serialization protocol, and based on the memory resource benchmark value and the global memory benchmark value in the memory resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the memory resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the network transmission benchmark value corresponding to the target candidate serialization protocol, and based on the network transmission benchmark value and the network global benchmark value among the network transmission benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the network resource efficiency corresponding to the target candidate serialization protocol.
[0159] Preferably, the third protocol scoring unit is used to determine the security constraint score corresponding to each candidate serialization protocol through the following steps: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the requested security constraint data, query the system security requirement level corresponding to the current request from the system security requirement database; Query the protocol security level corresponding to the target candidate serialization protocol from the protocol security level library; Based on the protocol security level corresponding to the target candidate serialization protocol and the system security requirement level corresponding to the current request, the security constraint score of the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the security constraint score corresponding to each candidate serialization protocol is obtained.
[0160] Preferably, the fourth protocol scoring unit is used to determine the language compatibility score corresponding to each candidate serialization protocol through the following steps: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility coefficient of the target candidate serialization protocol is queried from the protocol compatibility library; Based on the language compatibility coefficient, the language compatibility score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, a language compatibility score is obtained for each candidate serialization protocol.
[0161] Preferably, the fifth protocol scoring unit is used to determine the dynamic protocol adaptation score of each candidate serialization protocol through the following steps: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data and request security constraint data in the request-level decision data, determine the dynamic weights of data features, resource status, security constraints, and language compatibility. Based on the data feature scores corresponding to the target candidate serialization protocol and the dynamic weights of the data features, a weighted score for the data features is determined. Based on the resource status score corresponding to the target candidate serialization protocol and the dynamic weight of the resource status, a weighted score of resource status is determined; Based on the security constraint score corresponding to the target candidate serialization protocol and the dynamic weight of the security constraint, a weighted score for the security constraint is determined. Based on the language compatibility score corresponding to the target candidate serialization protocol and the dynamic weight of language compatibility, a weighted score for language compatibility is determined. Based on the weighted scores of the data features, the resource status, the security constraints, and the language compatibility, the dynamic protocol adaptation score of the target candidate serialization protocol is determined. By traversing through each candidate serialization protocol in the candidate serialization protocol set, a dynamic protocol adaptation score is obtained for each candidate serialization protocol.
[0162] It should be noted that the request-level serialization protocol dynamic selection device for multi-cloud architecture provided in the second aspect embodiment of the present invention can realize all the processes of the request-level serialization protocol dynamic selection method for multi-cloud architecture described in the first aspect above. The functions and technical effects of each module and unit in the device are the same as the functions and technical effects of the request-level serialization protocol dynamic selection method for multi-cloud architecture described in the first aspect embodiment above, and will not be repeated here.
[0163] A third aspect of the present invention also provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a request-level serialization protocol dynamic selection method for multi-cloud architecture as described in any of the first aspects above.
[0164] The fourth aspect of the present invention also provides a terminal device, see [link to documentation]. Figure 6 The diagram shown is a structural block diagram of a preferred embodiment of a terminal device provided in the fourth aspect of the present invention. The terminal device includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10. When executing the computer program, the processor 10 implements a request-level serialization protocol dynamic selection method for multi-cloud architecture as described in any of the above embodiments.
[0165] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 20 and executed by the processor 10 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0166] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor 10 may be any conventional processor. The processor 10 is the control center of the terminal device, connecting various parts of the terminal device through various interfaces and lines.
[0167] The memory 20 mainly includes a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc., while the data storage area can store related data, etc. Furthermore, the memory 20 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard drive, a smart media card (SMC), a secure digital card (SD), and a flash card, or other volatile solid-state storage devices.
[0168] It should be noted that the aforementioned terminal device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above content is merely an example describing the structure of the terminal device and does not constitute a limitation on the structure of the aforementioned terminal device. The aforementioned terminal device may include more or fewer components than those described above, or combine certain components, or different components.
[0169] A fifth aspect embodiment of the present invention also provides a computer program product, including a computer program that, when executed by a processor 10, implements a request-level serialization protocol dynamic selection method for a multi-cloud architecture as described in any of the first aspect embodiments above.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary hardware platforms, and of course, it can also be implemented entirely by hardware. Based on this understanding, all or part of the technical solution of the present invention that contributes to the background technology can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0171] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0172] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for dynamically selecting request-level serialization protocols for multi-cloud architectures, characterized in that, include: Receive business communication requests sent by the request initiator, and respond to the business communication requests by collecting request-level decision data; Based on the request-level decision data, a preset multi-dimensional protocol knowledge base is invoked to perform dynamic protocol adaptation scoring on each candidate serialization protocol, wherein the dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol under multiple protocol adaptation dimensions. The candidate serialization protocol with the highest dynamic score for protocol adaptation is determined as the target serialization protocol.
2. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 1, characterized in that, The preset multidimensional protocol knowledge base includes a protocol execution benchmark time library, a protocol readability coefficient library, a protocol resource efficiency coefficient library, a system security requirement library, a protocol security level library, and a protocol compatibility library. Then, the step of dynamically scoring the protocol adaptation of each candidate serialization protocol based on the request-level decision data by calling the preset multidimensional protocol knowledge base includes: Based on the serializable feature data in the request-level decision data, the data feature scores corresponding to each candidate serialization protocol are determined from the protocol execution benchmark time library and the protocol readability coefficient library. Based on the system resource load data in the request-level decision data, the resource status score corresponding to each candidate serialization protocol is determined from the protocol resource efficiency coefficient library; Based on the request security constraint data in the request-level decision data, the security constraint score corresponding to each candidate serialization protocol is determined from the system security requirement library and the protocol security level library. Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility score corresponding to each candidate serialization protocol is determined from the protocol compatibility library. Based on the data feature score, resource status score, security constraint score, language compatibility score, and dynamic weight of each candidate serialization protocol, the protocol adaptation dynamic score of each candidate serialization protocol is determined.
3. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 2, characterized in that, The step of determining the data feature score corresponding to each candidate serialization protocol based on the serializable feature data in the request-level decision data, from the protocol execution benchmark time library and the protocol readability coefficient library, includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the data type in the feature data to be serialized, the serialization time benchmark and deserialization time benchmark corresponding to the target candidate serialization protocol are queried from the protocol execution benchmark time library. Based on the serialization time benchmark and deserialization time benchmark corresponding to each candidate serialization protocol in the candidate serialization protocol set, the maximum execution time benchmark is determined. Based on the serialization time benchmark, deserialization time benchmark, and the maximum execution time benchmark corresponding to the target candidate serialization protocol, the time adaptation score of the target candidate serialization protocol is determined. Based on the readability requirement information in the feature data to be serialized, the protocol readability coefficient corresponding to the target candidate serialization protocol is queried from the protocol readability coefficient library; Based on the protocol readability coefficient and the time adaptation score, the data feature score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the data feature score corresponding to each candidate serialization protocol is obtained.
4. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 3, characterized in that, It also includes updating the protocol execution benchmark time library, which is done through the following steps: Obtain protocol execution monitoring information corresponding to the target candidate serialization protocol; The protocol execution monitoring information is filtered for abnormal discrete data to determine whether the protocol execution monitoring information is normal data. If the protocol execution monitoring information is normal data, then base data is determined based on the protocol execution monitoring information; If the protocol execution monitoring information is abnormal data, then the protocol execution monitoring information is filtered or downgraded to obtain the filtered or downgraded baseline data. Based on the benchmark data, a new measurement time corresponding to the target candidate serialization protocol is determined; Based on the new measurement time and the historical reference time stored in the protocol execution reference time library, the protocol execution reference time corresponding to the target candidate serialization protocol is attenuated and calibrated to obtain the updated protocol execution reference time. The updated protocol execution reference time is written into the protocol execution reference time library.
5. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 3, characterized in that, It also includes establishing the protocol readability coefficient library, which is established through the following steps: Obtain the global default readability configuration, service-level readability configuration, and interface-level readability configuration corresponding to each candidate serialization protocol; Based on the global default readability configuration, the service dimension readability configuration, and the interface dimension readability configuration, the target readability coefficients corresponding to each candidate serialization protocol are determined, and the protocol readability coefficient library is established based on the target readability coefficients corresponding to each candidate serialization protocol.
6. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 5, characterized in that, The determination of the target readability coefficient for each candidate serialization protocol includes: Choose any one of the candidate serialization protocols from the list of candidate serialization protocols as the target candidate serialization protocol; Determine whether the interface dimension readability configuration corresponding to the target candidate serialization protocol exists; If the interface-level readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the interface-level readability configuration. If the interface dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then determine whether the service dimension readability configuration corresponding to the target candidate serialization protocol exists. If the service dimension readability configuration corresponding to the target candidate serialization protocol exists, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the service dimension readability configuration. If the service dimension readability configuration corresponding to the target candidate serialization protocol does not exist, then the target readability coefficient corresponding to the target candidate serialization protocol is determined based on the global default readability configuration. Iterate through each candidate serialization protocol to obtain the target readability coefficient for each candidate serialization protocol.
7. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 2, characterized in that, Based on the system resource load data in the request-level decision data, the resource status score corresponding to each candidate serialization protocol is determined from the protocol resource efficiency coefficient library, including: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data, determine the CPU load coefficient, memory load coefficient, and network bandwidth load coefficient of the current system. From the protocol resource efficiency coefficient library, query the CPU resource efficiency, memory resource efficiency, and network resource efficiency corresponding to the target candidate serialization protocol; Based on the CPU load coefficient and the CPU resource efficiency, determine the CPU resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the memory load coefficient and the memory resource efficiency, the memory resource adaptor score corresponding to the target candidate serialization protocol is determined; Based on the network bandwidth load coefficient and the network resource efficiency, determine the network resource adaptor sub-score corresponding to the target candidate serialization protocol; Based on the CPU resource adapter score, the memory resource adapter score, and the network resource adapter score, the resource status score corresponding to the target candidate serialization protocol is determined; Traverse each candidate serialization protocol in the candidate serialization protocol set to obtain the resource status score corresponding to each candidate serialization protocol.
8. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 7, characterized in that, The step of determining the CPU load factor, memory load factor, and network bandwidth load factor of the current system based on the system resource load data includes: Based on the current CPU utilization and the preset CPU full load utilization in the system resource load data, the CPU load coefficient corresponding to the current system is determined; Based on the current available memory and total system memory in the system resource load data, determine the memory load coefficient corresponding to the current system; Based on the current network bandwidth usage and total system network bandwidth in the system resource load data, the network bandwidth load coefficient corresponding to the current system is determined.
9. A method for dynamic selection of request-level serialization protocols for multi-cloud architecture as described in claim 7, characterized in that, The CPU resource efficiency, memory resource efficiency, and network resource efficiency are determined through the following steps: From the protocol resource efficiency coefficient library, query the CPU resource benchmark value corresponding to the target candidate serialization protocol, and based on the CPU resource benchmark value and the global CPU benchmark value in the CPU resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the CPU resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the memory resource benchmark value corresponding to the target candidate serialization protocol, and based on the memory resource benchmark value and the global memory benchmark value in the memory resource benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the memory resource efficiency corresponding to the target candidate serialization protocol; From the protocol resource efficiency coefficient library, query the network transmission benchmark value corresponding to the target candidate serialization protocol, and based on the network transmission benchmark value and the network global benchmark value among the network transmission benchmark values corresponding to each candidate serialization protocol in the candidate serialization protocol set, determine the network resource efficiency corresponding to the target candidate serialization protocol.
10. A method for dynamic selection of request-level serialization protocols for multi-cloud architecture as described in claim 2, characterized in that, The step of determining the security constraint score corresponding to each candidate serialization protocol from the system security requirement library and the protocol security level library includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the requested security constraint data, query the system security requirement level corresponding to the current request from the system security requirement database; Query the protocol security level corresponding to the target candidate serialization protocol from the protocol security level library; Based on the protocol security level corresponding to the target candidate serialization protocol and the system security requirement level corresponding to the current request, the security constraint score of the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, the security constraint score corresponding to each candidate serialization protocol is obtained.
11. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 2, characterized in that, Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility score corresponding to each candidate serialization protocol is determined from the protocol compatibility library, including: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the language features of the communication to be serialized in the request-level decision data, the language compatibility coefficient of the target candidate serialization protocol is queried from the protocol compatibility library; Based on the language compatibility coefficient, the language compatibility score corresponding to the target candidate serialization protocol is determined; By traversing through each candidate serialization protocol in the candidate serialization protocol set, a language compatibility score is obtained for each candidate serialization protocol.
12. The method for dynamic selection of request-level serialization protocol for multi-cloud architecture as described in claim 2, characterized in that, The process of determining the protocol adaptation dynamic score for each candidate serialization protocol based on data feature scores, resource status scores, security constraint scores, language compatibility scores, and dynamic weights corresponding to each score includes: Choose any candidate serialization protocol from the set of candidate serialization protocols as the target candidate serialization protocol; Based on the system resource load data and request security constraint data in the request-level decision data, determine the dynamic weights of data features, resource status, security constraints, and language compatibility. Based on the data feature scores corresponding to the target candidate serialization protocol and the dynamic weights of the data features, a weighted score for the data features is determined. Based on the resource status score corresponding to the target candidate serialization protocol and the dynamic weight of the resource status, a weighted score of resource status is determined; Based on the security constraint score corresponding to the target candidate serialization protocol and the dynamic weight of the security constraint, a weighted score for the security constraint is determined. Based on the language compatibility score corresponding to the target candidate serialization protocol and the dynamic weight of language compatibility, a weighted score for language compatibility is determined. Based on the weighted scores of the data features, the resource status, the security constraints, and the language compatibility, the dynamic protocol adaptation score of the target candidate serialization protocol is determined. By traversing through each candidate serialization protocol in the candidate serialization protocol set, a dynamic protocol adaptation score is obtained for each candidate serialization protocol.
13. A request-level serialization protocol dynamic selection device for multi-cloud architecture, used to implement the request-level serialization protocol dynamic selection method for multi-cloud architecture as described in any one of claims 1 to 12, the device comprising: The data acquisition module is used to receive business communication requests sent by the request initiator and, in response to the business communication requests, collect request-level decision data. The protocol scoring module is used to dynamically score the protocol adaptation of each candidate serialization protocol based on the request-level decision data and by calling a preset multi-dimensional protocol knowledge base. The dynamic protocol adaptation score is a comprehensive score of the candidate serialization protocol under multiple protocol adaptation dimensions. The protocol determination module is used to determine the candidate serialization protocol with the highest dynamic score of protocol adaptation as the target serialization protocol.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a request-level serialization protocol dynamic selection method for a multi-cloud architecture as described in any one of claims 1 to 12.
15. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a request-level serialization protocol dynamic selection method for a multi-cloud architecture as described in any one of claims 1 to 12.