CN117076544A - Data conversion service request processing method, system, device and computer equipment - Google Patents

Data conversion service request processing method, system, device and computer equipment Download PDF

Info

Publication number
CN117076544A
CN117076544A CN202311323713.7A CN202311323713A CN117076544A CN 117076544 A CN117076544 A CN 117076544A CN 202311323713 A CN202311323713 A CN 202311323713A CN 117076544 A CN117076544 A CN 117076544A
Authority
CN
China
Prior art keywords
request
resource
engine layer
data
data conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311323713.7A
Other languages
Chinese (zh)
Other versions
CN117076544B (en
Inventor
朱绍明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311323713.7A priority Critical patent/CN117076544B/en
Publication of CN117076544A publication Critical patent/CN117076544A/en
Application granted granted Critical
Publication of CN117076544B publication Critical patent/CN117076544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data conversion service request processing method, a system, a device and computer equipment. The method involves artificial intelligence, comprising: and acquiring the first data resource and the request state information of the data conversion service request, acquiring an engine layer service address list of the engine layer server, and re-acquiring the updated engine layer service address list after waiting for the request delay time if the request state information is determined to meet the delay processing condition. And randomly selecting a target engine layer service instance based on the updated engine layer service address list, forwarding a data conversion service request to the target engine layer service instance, and indicating the target engine layer service instance to call any idle computing resource when determining that the idle computing resource exists, and performing data conversion service processing on the first data resource to obtain second data resources with different resource types. By adopting the method, idle computing resources are reasonably utilized by adopting a mode of combining random and polling, and the request processing efficiency is improved.

Description

Data conversion service request processing method, system, device and computer equipment
Technical Field
The present application relates to the field of computer technology, and in particular, to a data conversion service request processing method, system, apparatus, computer device, storage medium, and computer program product.
Background
Along with development of computer technology and popularization and use of different application programs or application platforms, there are usually multiple data resources with different resource types on different application programs, so as to meet different requirements in an actual application process, and conversion processing needs to be performed on the data resources with different resource types, for example, converting text resources into audio data resources or converting image resources and text resources into video resources together.
Conventionally, a service distributed deployment manner is generally adopted, and data conversion processing requests triggered by different request terminals are processed simultaneously through distributed service resources. However, since the distributed service resources are limited, when a large number of data conversion processing requests triggered by the request terminals occur simultaneously, there is a case that the requests fail due to insufficient service resources, and the requests need to be re-triggered multiple times.
However, the conventional method of triggering the request for multiple times has larger randomness, and has higher request failure rate, so that the random downstream server cannot be guaranteed to have enough idle computing resources to meet the processing requirement, and the idle computing resources in each downstream server cannot be completely and effectively utilized, so that the resources are wasted. Therefore, the request failure rate of the conversion processing for the data resource is conventionally high, resulting in that the processing efficiency still remains to be improved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data conversion service request processing method, system, apparatus, computer device, storage medium, and computer program product that can reduce the request failure rate of performing data conversion processing on a data resource and improve the data conversion processing efficiency.
In a first aspect, the present application provides a method for processing a data conversion service request, including:
receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information;
acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for a request delay time if the request state information is determined to meet a delay waiting processing condition;
randomly selecting a target engine layer service instance based on the updated engine layer service address list, and forwarding the data conversion service request to the target engine layer service instance;
if the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, and a second data resource is obtained through conversion; the first data resource and the second data resource are respectively of different resource types.
In one embodiment, when a target engine layer service instance is randomly selected based on the updated engine layer service address list, the method further comprises:
and eliminating the target engine layer service instance from the engine layer service address list, and updating the request try times.
In a second aspect, the present application further provides a data conversion service request processing method, including:
receiving a data conversion service request forwarded by an access layer server, and feeding back a current engine layer service address list to the access layer through an address storage server; the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance;
acquiring a first data resource carried by the data conversion service request;
acquiring the current residual computing resource limit of the target engine layer service instance, and determining whether idle computing resources exist or not based on the residual computing resource limit;
If the idle computing resources are determined to exist, any idle computing resource is called through the target engine layer service instance, and data conversion service processing is carried out on the first data resource, so that a second data resource is obtained through conversion; the first data resource and the second data resource are respectively of different resource types.
In a third aspect, the present application further provides a data conversion service request processing system, where the system includes an access layer server and an engine layer server, where the engine layer server includes a plurality of engine layer service instances; wherein:
the access layer server is used for: receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information; acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for a request delay time if the request state information is determined to meet a delay waiting processing condition; randomly selecting a target engine layer service instance based on the updated engine layer service address list, and forwarding the data conversion service request to the target engine layer service instance;
The engine layer server is used for: and if the idle computing resources exist in the target engine layer service instance, calling any idle computing resource through the target engine layer service instance, performing data conversion service processing on the first data resource, and converting the first data resource into a second data resource, wherein the first data resource and the second data resource are respectively of different resource types.
In a fourth aspect, the present application further provides a data conversion service request processing device, including:
the data conversion service request receiving module is used for receiving a data conversion service request and acquiring first data resources carried by the data conversion service request and reset request state information;
the engine layer service address list acquisition module is used for acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for the request delay time if the request state information is determined to meet the delay waiting processing condition;
the data conversion service request forwarding module is used for randomly selecting a target engine layer service instance based on the updated engine layer service address list and forwarding the data conversion service request to the target engine layer service instance;
The second data resource obtaining module is used for indicating the target engine layer service instance to call any idle computing resource if the idle computing resource exists in the target engine layer service instance, and carrying out data conversion service processing on the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
In a fifth aspect, the present application further provides a data conversion service request processing apparatus, including:
the engine layer service address list feedback module is used for receiving the data conversion service request forwarded by the access layer server and feeding back the current engine layer service address list to the access layer through the address storage server; the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance;
the first data resource acquisition module is used for acquiring a first data resource carried by the data conversion service request;
The residual computing resource limit acquisition module is used for acquiring the current residual computing resource limit of the target engine layer service instance and determining whether idle computing resources exist or not based on the residual computing resource limit;
the data conversion service processing module is used for calling any idle computing resource through the target engine layer service instance if the idle computing resource exists, and performing data conversion service processing on the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
In a sixth aspect, the present application also provides a computer device comprising a memory storing a computer program and a processor implementing the method of the first aspect or its implementations when the processor executes the computer program.
In a seventh aspect, the present application also provides a computer device comprising a memory storing a computer program and a processor implementing the method of the second aspect or implementations thereof when the computer program is executed.
In an eighth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of the first aspect or implementations thereof.
In a ninth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of the second aspect or implementations thereof.
In a tenth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect or implementations thereof.
In an eleventh aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the second aspect or implementations thereof described above.
In the data conversion service request processing method, system, device, computer equipment, storage medium and computer program product, the first data resource carried by the data conversion service request and the reset request state information are acquired by receiving the data conversion service request, and the engine layer service address list corresponding to the engine layer server is acquired. Further, if the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is re-acquired after waiting for the request delay time, and after delay waiting, the re-acquired updated re-engine layer service address list is reasonably retried by utilizing the automatic capacity expansion function of the engine layer server, so that the request failure rate is reduced. Further, a target engine layer service instance is randomly selected based on the updated engine layer service address list, a data conversion service request is forwarded to the target engine layer service instance, if the target engine layer service instance is determined to have idle computing resources, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, the first data resource and the second data resource with different resource types are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of the computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is an application environment diagram of a data conversion service request processing method in one embodiment;
FIG. 2 is a flow diagram of a method of processing a data conversion service request in one embodiment;
FIG. 3 is a flow chart of a method for processing a request for data conversion service according to another embodiment;
FIG. 4 is a flow chart of a method for processing a request for data conversion service according to yet another embodiment;
FIG. 5 is a flow chart of a method of processing a data conversion service request in yet another embodiment;
FIG. 6 is a timing diagram of a method of processing a data conversion service request according to one embodiment;
FIG. 7 is a schematic overall flow diagram of a method for processing a data conversion service request in one embodiment;
FIG. 8 is a schematic diagram of an architecture of a data conversion service request processing system in one embodiment;
FIG. 9 is a schematic diagram of a data conversion service request processing system according to another embodiment;
FIG. 10 is a block diagram showing the structure of a data conversion service request processing apparatus in one embodiment;
FIG. 11 is a block diagram showing a structure of a data conversion service request processing apparatus according to another embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The data conversion service request processing method provided by the embodiment of the application particularly relates to an artificial intelligence technology, and can be applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic, network media, auxiliary driving and the like. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision. Meanwhile, the artificial intelligence technology is a comprehensive subject, and relates to a technology with a wide field, namely a technology with a hardware level and a technology with a software level, and the artificial intelligence basic technology generally comprises a sensor, a special artificial intelligence chip, cloud computing, distributed storage, a big data processing technology, a pre-training model technology, an operation/interaction system, electromechanical integration and the like. The pre-training model is also called a large model and a basic model, and can be widely applied to all large-direction downstream tasks of artificial intelligence after fine adjustment. Specifically, the artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Among the key technologies of the speech technology (Speech Technology) are automatic speech recognition technology (ASR) and speech synthesis technology (TTS) and voiceprint recognition technology. The method can enable the computer to listen, watch, say and feel, is the development direction of human-computer interaction in the future, and voice becomes one of the best human-computer interaction modes in the future. The large model technology brings revolution for the development of the voice technology, and WavLM, uniSpeech and other pre-training models which use a transducer architecture have strong generalization and universality and can excellently finish voice processing tasks in all directions.
With research and progress of artificial intelligence technology, research and application of artificial intelligence technology is being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, autopilot, unmanned, digital twin, virtual man, robot, artificial Intelligence Generated Content (AIGC), conversational interaction, smart medical treatment, smart customer service, game AI, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and with increasing importance value.
The data conversion service request processing method provided by the embodiment of the application particularly relates to a voice technology in an artificial intelligence technology, and can be applied to an application environment shown in fig. 1. The request terminal 102 communicates with the access layer server 104, and the access layer server 104 and the engine layer server 106 via a network. The data storage system may store data that the access layer server 104 and the engine layer server 106 need to process. The data storage system may be separately provided, may be integrated on the access layer server 104 and the engine layer server 106, or may be placed on a cloud or other network broadcast control server. The request terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, portable wearable devices, aircrafts, etc., where the internet of things devices may be smart speakers, smart televisions, smart vehicle devices, etc. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The access layer server 104 and the engine layer server 106 may be independent physical broadcast control servers, or may be a broadcast control server cluster formed by a plurality of physical broadcast control servers, or may be a cloud broadcast control server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms, and the request terminal 102, the access layer server 104, the engine layer server 106, and the like, which may be directly or indirectly connected through wired or wireless communication modes.
The request terminal 102, the access layer server 104 and the engine layer server 106 may be separately configured to execute the data conversion service request processing method provided in the embodiment of the present application, and the request terminal 102, the access layer server 104 and the engine layer server 106 may also cooperatively execute the data conversion service request processing method provided in the embodiment of the present application, for example, taking the request terminal 102, the access layer server 104 and the engine layer server 106 cooperatively execute the data conversion service request processing method provided in the embodiment of the present application as an example, the access layer server 104 receives the data conversion service request triggered by the request terminal 102, and obtains the first data resource carried by the data conversion service request and the reset request state information. Further, the access layer server 104 acquires the corresponding service address list of the engine layer server 106, and if it is determined that the request status information meets the latency processing condition, the updated service address list of the engine layer is re-acquired after waiting for the request latency time. The access layer server 104 may randomly select a target engine layer service instance based on the updated engine layer service address list, and forward the data conversion service request to the target engine layer service instance in the engine layer server 106, so that when it is determined that the target engine layer service instance has idle computing resources, the access layer server 104 further instructs the target engine layer service instance to call any idle computing resource, performs data conversion service processing on the first data resource, and converts the first data resource to obtain a second data resource, where the first data resource and the second data resource are respectively of different resource types. Finally, the access stratum server 104 may feed back the converted second data resource to the requesting terminal 102 that triggers the data conversion service request.
Likewise, taking the data conversion service request processing method provided by the embodiment of the present application as an example, the request terminal 102, the access layer server 104 and the engine layer server 106 cooperatively execute the data conversion service request processing method, the engine layer server 106 receives the data conversion service request forwarded by the access layer server 104 and feeds back the current engine layer service address list to the access layer 104. The data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer 104 again after determining that the delay waiting processing condition is currently met and the engine layer server 106 waits for the request delay time, and the updated engine layer service address list is used for determining the target engine layer service instance. Further, the engine layer server 106 obtains the first data resource carried by the data conversion service request, and obtains the current remaining computing resource amount of the target engine layer service instance, so as to determine whether the target engine layer service instance has idle computing resources based on the remaining computing resource amount. If it is determined that there are idle computing resources, the engine layer server 106 invokes any idle computing resource through the target engine layer service instance, and performs data conversion service processing on the first data resource to obtain a second data resource, where the first data resource and the second data resource are respectively of different resource types. Finally, the engine layer server 106 feeds back the converted second data resource to the access layer server 104, and feeds back the second data resource to the request terminal 102 through the access layer server 104.
In an exemplary embodiment, as shown in fig. 2, a data conversion service request processing method is provided, and an example of application of the method to the access layer server 104 in fig. 1 is described, which includes the following steps S202 to S208. Wherein:
step S202, a data conversion service request is received, and a first data resource carried by the data conversion service request and the reset request state information are obtained.
The data conversion service request represents a service request for converting a resource type of different data resources, such as converting a text type data resource into an audio type data resource, or converting a text type, an image type data resource into a video type data resource, and the like. Specifically, the request terminal triggers a data conversion service request, such as a text-to-audio service request, according to an actual conversion requirement, and forwards the triggered data conversion service request to the access layer server.
Specifically, the access layer server receives a data conversion service request triggered by a request terminal and acquires a first data resource carried by the data conversion service request. The first data resources may be different resource types, such as different types of data resources of text type, image type, audio type, and video type.
The data conversion service request also illustratively carries a target resource type to be converted, such as a second data resource that requires conversion of a first data resource of a text type to an audio type, i.e., the audio type is then the target resource type that requires conversion.
Further, after receiving the data conversion service request, the access layer server needs to further acquire the reset request state information corresponding to the data conversion service request.
In an exemplary embodiment, the reset request state information is obtained by acquiring initial request state information carried by a data conversion service request, and performing reset processing on the initial request state information.
The initial request state information specifically includes an initial request trigger time, an initial request attempt number threshold, and an initial request delay time. The reset request state information specifically includes request reaching time, request try times threshold and request delay time.
Specifically, the initial request triggering time indicates a time point when the request terminal triggers the data conversion service request, and the time point when the access layer server needs to re-receive the data conversion service request, that is, the time point when the data conversion service request reaches the access layer server is re-obtained, and the time point is taken as the request reaching time, namely, the initial request triggering time is reset to the request reaching time, because the time point when the request terminal triggers the data conversion service request cannot be guaranteed to be immediately forwarded to the access layer server.
Similarly, the initial request attempt number indicates the request attempt number of a certain data conversion service request triggered by a requesting terminal, and since different requesting terminals may trigger data conversion service requests with the same conversion requirement multiple times according to actual requirements, the same data conversion service request may have multiple request processing cases. In order to correctly count the request success rate of the data conversion service requests triggered by each request terminal, the initialization processing is required to be performed on the request attempt times of each data conversion service request triggered by different request terminals, so that the influence of the historical request times on the request success rate is avoided. In the embodiment of the present application, specifically, the number of request attempts of each data conversion service request is reset to 1.
For example, the threshold of the initial request attempt number and the initial request delay time may be set randomly in advance, for example, the threshold of the initial request attempt number is set to 5, for example, the initial request delay time is set to 30 seconds, that is, after 5 attempt requests are made, the processing of the data conversion service request is stopped, and the request is retried after waiting for the initial request delay time, that is, 30 seconds. And because the engine layer server has an automatic capacity expansion and contraction function, each engine layer service instance which is currently included can be updated in real time, if a fixed initial request try frequency threshold is set, the conditions of uneven service resource distribution and service resource waste are easy to occur, the number of the engine layer service instances in an engine layer service address list is further required to be acquired in real time, and the initial request try frequency threshold is reset according to the number of the engine layer service instances, namely, the fixed initial request try frequency threshold is dynamically reset to the number of the engine layer service instances which are acquired in real time.
Similarly, since the resource lengths of the first data resources to be converted corresponding to the different data conversion service requests are different, and the data resource conversion processing times of the different resource lengths are also different, if a fixed initial request delay time is set, there is a case that the delay time of the first data resources with shorter resource lengths is too long or the delay time of the first data resources with longer resource lengths is too short, the request processing efficiency is low, and further, dynamic reset processing is required to be performed on the initial request delay time according to the data resource lengths of the first data resources.
Step S204, obtaining an engine layer service address list corresponding to the engine layer server, and if the request state information is determined to meet the delay waiting processing condition, re-obtaining the updated engine layer service address list after waiting for the request delay time.
The engine layer server may be understood as a server instance set including a plurality of engine layer service instances, where each engine layer service instance corresponds to a respective server instance address, and further, by forwarding a data conversion service request to be processed to each server instance address, different data conversion service requests may be simultaneously processed by each engine layer service instance.
Specifically, the access layer server triggers an engine layer service address acquisition request and sends the engine layer service address acquisition request to the address storage server, so that the address storage server responds to the engine layer service address acquisition request after receiving the engine layer service address acquisition request sent by the access layer server, extracts an engine layer service address list corresponding to the engine layer server, and feeds back the engine layer service address list to the access layer server.
Further, the access layer server determines whether the request state information meets the deferred waiting processing condition, wherein if the request state information is determined to meet the deferred waiting processing condition, the access layer server re-acquires the updated engine layer service address list after waiting for the request delay time. In the process of waiting for the request delay time, the engine layer server updates the current engine layer service examples in real time through the self automatic capacity expansion and contraction function to obtain an updated engine layer service address list, so that more engine layer service examples can be provided for the access layer server, the request retry times caused by insufficient service resources are further reduced, and the request processing success rate is improved.
Step S206, a target engine layer service instance is randomly selected based on the updated engine layer service address list, and the data conversion service request is forwarded to the target engine layer service instance.
Specifically, the access layer server randomly selects an engine layer service address based on the updated engine layer service address list, and determines an engine layer service instance corresponding to the selected engine layer service address as a target engine layer service instance, so as to forward the data conversion service request to the target engine layer service instance.
Step S208, if it is determined that the idle computing resource exists in the service instance of the target engine layer, the service instance of the target engine layer is instructed to call any idle computing resource, the data conversion service processing is performed on the first data resource, a second data resource is obtained through conversion, and the first data resource and the second data resource are respectively of different resource types.
Specifically, after forwarding the data conversion service request to the target engine layer service instance, the access layer server further instructs the engine layer server to acquire the remaining computing resource unit of the target engine layer service instance, and instructs the target engine layer service instance to call any idle computing resource when determining that the idle computing resource exists in the target engine layer service instance, and performs data conversion service processing on the first data resource to obtain the second data resource.
If the remaining computing resource limit of the target engine layer service instance is greater than 0, it indicates that there are idle computing resources currently, and the access layer server further instructs the target engine layer service instance to call any idle computing resource, and performs data conversion service processing on the first data resource.
Further, the data conversion service request carries the first data resource to be converted and the target resource type to be converted, and further specifically converts the first data resource into the second data resource corresponding to the target resource type according to the target resource type.
In an exemplary embodiment, taking the first data resource as a text type data resource, taking the audio type as an example as a target resource type to be converted, if the second data resource is an audio type data resource, the text type first data resource is specifically converted into the audio type second data resource.
In the data conversion service request processing method, the first data resource carried by the data conversion service request and the reset request state information are acquired by receiving the data conversion service request, and the engine layer service address list corresponding to the engine layer server is acquired. Further, if the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is re-acquired after waiting for the request delay time, and in the delay waiting process, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, a target engine layer service instance is randomly selected based on the updated engine layer service address list, a data conversion service request is forwarded to the target engine layer service instance, if the target engine layer service instance is determined to have idle computing resources, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, the first data resource and the second data resource with different resource types are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of the computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, as shown in fig. 3, a data conversion service request processing method is provided, and an example of application of the method to the access layer server 104 in fig. 1 is described, which includes the following steps S302 to S314. Wherein:
step S302, a data conversion service request is received, and a first data resource carried by the data conversion service request is obtained.
Specifically, the access layer server receives a data conversion service request triggered by a request terminal and acquires a first data resource carried by the data conversion service request. The first data resources may be different resource types, such as different types of data resources of text type, image type, audio type, and video type.
The data conversion service request further carries a target resource type to be converted, for example, a first data resource of a text type needs to be converted into a second data resource of an audio type, that is, the audio type is the target resource type to be converted.
Step S304, obtaining initial request state information carried by the data conversion service request, and carrying out reset processing on the initial request state information to obtain reset request state information, wherein the request state information comprises request reaching time, request try times threshold and request delay time.
The data conversion service request includes a non-streaming request type and a streaming request type, the non-streaming request type indicates that for each data conversion service request, a processing result can be returned after a complete first data resource is processed, that is, the complete second data resource can be fed back after the complete first data resource is converted into the second data resource, so that a user object of the request terminal generally has higher tolerance on response time consumption, and the request delay time can be set to a fixed larger value, such as 30 seconds, 60 seconds, and the like, so as to improve the request success rate.
The streaming request type indicates that for each data conversion service request, real-time return of a conversion result can be supported in a processing process, namely, in the process of converting the first resource data into the second resource data, the conversion result of each section of first resource can be fed back in real time, namely, each section of second resource is fed back in real time, the use object of the streaming request type data conversion service request is triggered, the tolerance on response time consumption is low, the request delay time is dynamically adjusted according to the resource length of the first resource which is converted according to actual requirements, and the problem of excessively long response time consumption is avoided.
Specifically, the initial request state information includes, in particular, an initial request trigger time, an initial request attempt number threshold, and an initial request delay time. The initial request triggering time indicates a time point when the request terminal triggers the data conversion service request, and the time point when the data conversion service request needs to be received again, namely, the time point when the data conversion service request reaches the access layer server is obtained again, and the time point is taken as the request reaching time, namely, the initial request triggering time is reset to the request reaching time, because the time point when the request terminal triggers the data conversion service request cannot be guaranteed to be immediately forwarded to the access layer server.
Similarly, the initial request attempt number indicates the request attempt number of a certain data conversion service request triggered by the requesting terminal, and since different requesting terminals may trigger the data conversion service request with the same conversion requirement multiple times according to the actual requirement, the same data conversion service request may have multiple request processing cases. In order to correctly count the request success rate of the data conversion service requests triggered by each request terminal, the initialization processing is required to be performed on the request attempt times of each data conversion service request triggered by different request terminals, so that the influence of the historical request times on the request success rate is avoided. In the embodiment of the present application, specifically, the number of request attempts of each data conversion service request is reset to 1.
Further, the delay time of the initial request may be set randomly in advance, and for each data conversion service request of the streaming request type, the resource lengths of the first data resources to be converted corresponding to the different data conversion service requests are different, and the data resource conversion processing time of the different resource lengths is also different.
Specifically, the resource length identification is performed on each first data resource, so as to obtain the data resource length corresponding to each first data resource, and the initial request delay time is dynamically reset according to each data resource length, so as to obtain the request delay time after reset.
The method comprises the steps of obtaining preset weight coefficients, determining request delay time corresponding to each first data resource according to the lengths of the data resources and the preset weight coefficients, and dynamically resetting fixed initial request delay time to be the determined request delay time. The preset weight coefficient can be set and adjusted according to actual requirements, and is not limited to a certain or a certain specific value.
Illustratively, the request delay time delay corresponding to the first data resource is determined by the following equation (1):
delay=len (Text) 0.1 formula (1)
The delay is a request delay time, len (Text) represents a resource length of a first data resource of a Text type, and a preset weight coefficient is 0.1.
Similarly, the threshold value of the initial request try times can be set randomly in advance, and because the engine layer server has an automatic capacity expansion and contraction function, each engine layer service instance currently included can be updated in real time, if the fixed threshold value of the initial request try times is set, the conditions of uneven service resource distribution and service resource waste are easy to occur, and further, the number of the engine layer service instances in the engine layer service address list needs to be acquired in real time, so that the threshold value of the initial request try times is reset according to the number of the engine layer service instances.
Specifically, the number of engine layer service instances in the engine layer service address list is obtained, and the initial request try number threshold is reset according to the number of engine layer service instances, so that the reset request try number threshold is obtained, namely, the fixed initial request try number threshold is dynamically reset to the number of engine layer service instances obtained in real time.
In an exemplary embodiment, dynamically resetting the initial request delay time according to each data resource length to obtain a reset request delay time includes:
determining sub-request delay time corresponding to each first data resource based on the lengths of the data resources and a preset weight coefficient; acquiring preset maximum request delay time, and carrying out dynamic reset processing on the initial request delay time based on each sub-request delay time and the preset maximum request delay time to acquire the reset request delay time.
Specifically, since the response time consumption tolerance of the usage object to the data conversion service request of the streaming request type is low, a preset maximum request delay time with a smaller value can be preset, the sub-request delay time corresponding to each first data resource is compared with the preset maximum request delay time, and the minimum value is determined from the sub-request delay time and the preset maximum request delay time.
That is, when each sub-request delay time is smaller than the preset maximum request delay time, the minimum value is determined from each sub-request delay time and is used as the request delay time corresponding to the current data conversion service request. When the sub-request delay time greater than the preset maximum request delay time exists, the preset maximum request delay time is used as the request delay time corresponding to the current data conversion service request, so that each time of resetting to the minimum delay time can be ensured, and the time consumption of waiting for overlong response is avoided.
Illustratively, the following formula (2) is adopted, and the minimum delay time delay' is determined as the request delay time corresponding to the current data conversion service request:
delay' =min {0.1×len (text), max } equation (2)
The delay' is the minimum delay time, len (text) is the resource length of the first data resource of the text type, 0.1 is a preset weight coefficient, and Max is the preset maximum request delay time.
Step S306, the current time in the data conversion process is acquired, and whether the request state information meets the non-timeout processing condition is determined based on the current time, the request arrival time and the request delay time.
Specifically, a time difference is determined based on the current time and the request arrival time, i.e. specifically, a difference between the current time and the request arrival time is calculated, a time difference is obtained, and the time difference and the request delay time are compared.
And if the time difference value is larger than the request delay time, determining that the request state information does not meet the non-timeout processing condition. Conversely, if the time difference is determined not to be greater than the request delay time, it is determined that the request state information satisfies the non-timeout processing condition.
Step S308, if it is determined that the request state information satisfies the non-timeout processing condition, it is determined whether the request state information satisfies the delay waiting processing condition based on the request attempt number and the request attempt number threshold.
Specifically, if it is determined that the request state information satisfies the non-timeout processing condition, that is, if it is determined that the time difference is not greater than the request delay time, the request attempt number is compared with the request attempt number threshold.
Further, if it is determined that the number of request attempts is not less than the request attempt number threshold, it is determined that the request state information satisfies the latency processing condition. Conversely, if it is determined that the number of request attempts is less than the request attempt number threshold, it is determined that the request state information does not satisfy the latency processing condition.
Step S310, an engine layer service address list corresponding to the engine layer server is obtained, and if the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is re-obtained after waiting for the request delay time.
Specifically, the access layer server triggers an engine layer service address acquisition request and sends the engine layer service address acquisition request to the address storage server, so that the address storage server responds to the engine layer service address acquisition request after receiving the engine layer service address acquisition request sent by the access layer server, extracts an engine layer service address list corresponding to the engine layer server, and feeds back the engine layer service address list to the access layer server.
Further, after the access layer server obtains the service address list of the engine layer corresponding to the engine layer server, it is further determined whether the request state information meets the delay waiting processing condition. If the request state information meets the delay waiting processing condition, the updated engine layer service address list is obtained again after waiting for the request delay time, and the engine layer service address list is dynamically updated in real time by utilizing the automatic capacity expansion and contraction function of the engine layer server in the process of waiting for the request delay time, so that more selectable engine layer service instances are provided for the access layer server, the request retry times are reduced, and the request success rate is improved.
Step S312, a target engine layer service instance is randomly selected based on the updated engine layer service address list, and the data conversion service request is forwarded to the target engine layer service instance.
Specifically, the access layer server randomly selects an engine layer service address based on the updated engine layer service address list, and determines an engine layer service instance corresponding to the selected engine layer service address as a target engine layer service instance, so as to forward the data conversion service request to the target engine layer service instance.
In one exemplary embodiment, after randomly selecting a target engine layer service instance based on the updated engine layer service address list and forwarding the data conversion service request to the target engine layer service instance, further comprising:
indicating the target engine layer service instance to acquire the residual computing resource limit, and determining whether idle computing resources exist in the target engine layer service instance according to the residual computing resource limit; and if the idle computing resources are not determined to exist, reselecting a new target engine layer service instance based on the updated engine layer service address list.
Specifically, after forwarding the data conversion service request to the target engine layer service instance, the access layer server further instructs the target engine layer service instance to acquire the remaining computing resource amount, and determines whether the target engine layer service instance has idle computing resources according to the remaining computing resource amount. And if the residual computing resource limit is determined to be greater than 0, indicating that idle computing resources exist currently. Conversely, if it is determined that the remaining computing resource amount is not greater than 0, it indicates that no free computing resources currently exist.
Further, if it is determined that the remaining computing resource amount is not greater than 0, that is, when no idle computing resource currently exists, it indicates that the currently selected target engine layer service instance cannot meet the processing requirement, and then, based on the updated engine layer service address list, a new target engine layer service instance is reselected.
Step S314, if it is determined that the idle computing resource exists in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, and the data conversion service processing is performed on the first data resource, so as to obtain the second data resource.
Specifically, after the access layer server forwards the data conversion service request to the target engine layer service instance, and when determining that the target engine layer service instance has idle computing resources, the access layer server instructs the target engine layer service instance to call any idle computing resource, performs data conversion service processing on the first data resource, and converts the first data resource to obtain a second data resource.
The data conversion service request carries a first data resource to be converted and a target resource type to be converted, and further specifically converts the first data resource into a second data resource corresponding to the target resource type according to the target resource type, for example, if the first data resource is a text type data resource and the target resource type to be converted is an audio type data resource, the second data resource is an audio type data resource, that is, specifically converts the text type first data resource into the audio type second data resource.
In the data conversion service request processing method, the first data resource carried by the data conversion service request is acquired by receiving the data conversion service request, the initial request state information carried by the data conversion service request is acquired, and the reset processing is carried out on the initial request state information to acquire the reset request state information. The method comprises the steps of obtaining the current time in the data conversion process, determining whether the request state information meets the non-timeout processing condition based on the current time, the request arrival time and the request delay time, and determining whether the request state information meets the delay waiting processing condition based on the request try times and the request try times threshold when the request state information is determined to meet the non-timeout processing condition. Further, by acquiring the engine layer service address list corresponding to the engine layer server, and when the request state information is determined to meet the delay waiting processing condition, waiting for the request delay time and then re-acquiring the updated engine layer service address list, a target engine layer service instance is randomly selected based on the updated engine layer service address list, and the data conversion service request is forwarded to the target engine layer service instance, the automatic capacity expansion function of the engine layer server can be utilized, and reasonable retry is performed on the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, when it is determined that the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is performed on the first data resource, and second data resource is obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, as shown in fig. 4, a data conversion service request processing method is provided, and an example of application of the method to the engine layer server 106 in fig. 1 is described, which includes the following steps S402 to S408. Wherein:
step S402, receiving a data conversion service request forwarded by an access layer server, and feeding back a current engine layer service address list to the access layer through an address storage server, wherein the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance.
Specifically, the request terminal triggers the data conversion service request and forwards the data conversion service request to the access layer server, and the access layer server further obtains an engine layer service address list corresponding to the engine layer server according to the data conversion service request.
After receiving the data conversion service request, the access layer server further triggers an engine layer service address acquisition request according to the first data resource to be processed, and sends the engine layer service address acquisition request to the address storage server to acquire an engine layer service address list corresponding to the engine layer server, which is fed back by the address storage server. The engine layer service examples are timed on the address storage server, register and synchronize the data such as the address or information of the respective examples, so that an engine layer service address list corresponding to the engine layer server can be obtained through the address storage server.
In an exemplary embodiment, the data conversion service request carries reset request state information, and the request state information is used for feeding back an updated engine layer service address list to the access layer after waiting for a request delay time when determining that a delay waiting processing condition is currently met, and the updated engine layer service address list is used for determining a target engine layer service instance. It can be understood that in the process of waiting for the request delay time, the engine layer server can update the current engine layer service examples in real time through the self automatic capacity expansion and contraction function to obtain the updated engine layer service address list, so that more engine layer service examples can be provided for the access layer server, the request retry times can be reduced, and the request processing success rate can be improved.
Further, the updated engine layer service address list is used to determine a target engine layer service instance, that is, the access layer server may select the target engine layer service instance according to the updated engine layer service address list, and forward the data conversion service request to a specific target engine layer service instance.
Step S404, a first data resource carried by the data conversion service request is obtained.
Specifically, after receiving the data conversion service request, the engine layer server further analyzes the data conversion service request to obtain a first data resource carried by the data conversion service request.
Wherein the first data resource represents a data resource that needs to be converted, which may be of different resource types, such as a text type, an image type, an audio type, and a video type.
Further, the data conversion service request further carries a target resource type to be converted, for example, the text type needs to be converted into the audio type, and the audio type is the target resource type to be converted, and then specifically, the first data resource of the text type is converted into the second data resource of the audio type.
Step S406, the current residual computing resource limit of the target engine layer service instance is obtained, and whether idle computing resources exist is determined based on the residual computing resource limit.
Specifically, the engine layer server obtains the current residual computing resource amount of the target engine layer service instance and judges whether the residual computing resource amount is greater than 0. If the remaining computing resource amount is greater than 0, it indicates that there is currently a free computing resource. Conversely, if the remaining computing resource amount is not greater than 0, it indicates that there are no free computing resources currently.
Step S408, if it is determined that there are idle computing resources, any idle computing resource is called through the target engine layer service instance, and the first data resource is subjected to data conversion service processing, so as to obtain a second data resource, where the first data resource and the second data resource are respectively of different resource types.
Specifically, if it is determined that there are idle computing resources, any idle computing resource is called through the target engine layer service instance, and according to the data conversion service request, the first data resource and the target resource type to be converted are carried, and the first data resource is converted into a second data resource corresponding to the target resource type.
For example, if the first data resource is a text type data resource and the target resource type to be converted is an audio type data resource, the second data resource is an audio type data resource, that is, the text type first data resource is specifically converted into the audio type second data resource.
In the data conversion service request processing method, the data conversion service request forwarded by the access layer server is received, and the current engine layer service address list is fed back to the access layer through the address storage server. The data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer after waiting for the request delay time when determining that the delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance. By performing delay waiting, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, by acquiring the first data resource carried by the data conversion service request and acquiring the current residual computing resource limit of the target engine layer service instance, when determining that the idle computing resource exists based on the residual computing resource limit, any idle computing resource is called by the target engine layer service instance, the data conversion service processing is performed on the first data resource, and the second data resource with different resource types is obtained through conversion, so that the idle computing resource existing in the target engine layer service instance is effectively utilized, the computing resource waste is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, as shown in fig. 5, a data conversion service request processing method is provided, and the method is applied to the engine layer server 106 in fig. 1 for illustration, and includes the following steps S502 to S516. Wherein:
step S502, receiving a data conversion service request forwarded by an access layer server, and feeding back a current engine layer service address list to the access layer through an address storage server, wherein the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance.
Specifically, the request terminal triggers an engine layer service address acquisition request according to a first data resource to be processed after receiving the data conversion service request by triggering the data conversion service request and forwarding the data conversion service request to the access layer server, and sends the engine layer service address acquisition request to the address storage server to acquire an engine layer service address list corresponding to the engine layer server, which is fed back by the address storage server.
The data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer after waiting for the request delay time when the current condition of waiting for processing is met, and the updated engine layer service address list is used for determining a target engine layer service instance. It can be understood that in the process of waiting for the request delay time, the engine layer server can update the current engine layer service examples in real time through the self automatic capacity expansion and contraction function to obtain the updated engine layer service address list, so that more engine layer service examples can be provided for the access layer server, the request retry times can be reduced, and the request processing success rate can be improved.
Step S504, a first data resource carried by the data conversion service request is obtained.
Specifically, after receiving the data conversion service request, the engine layer server further analyzes the data conversion service request to obtain a first data resource carried by the data conversion service request. Wherein the first data resource represents a data resource that needs to be converted, which may be of different resource types, such as a text type, an image type, an audio type, and a video type.
Step S506, the current residual computing resource limit of the target engine layer service instance is obtained, and whether idle computing resources exist is determined based on the residual computing resource limit.
Specifically, the engine layer server obtains the current residual computing resource amount of the target engine layer service instance and judges whether the residual computing resource amount is greater than 0. If the remaining computing resource amount is greater than 0, it indicates that there is currently a free computing resource. Conversely, if the remaining computing resource amount is not greater than 0, it indicates that there are no free computing resources currently.
Step S508, if it is determined that there are idle computing resources, any idle computing resource is called through the service instance of the target engine layer, and the data conversion service processing is performed on the first data resource, so as to obtain a second data resource.
Specifically, if it is determined that there are idle computing resources, the engine layer server invokes any idle computing resource through the target engine layer service instance, and converts the first data resource into a second data resource corresponding to the target resource type according to the data conversion service request carrying the first data resource to be converted and the target resource type to be converted.
Step S510, the called idle computing resource is removed from the residual resource limit, and the updated residual resource limit is obtained.
Specifically, when the target engine layer service instance calls a certain idle computing resource to perform data conversion service processing on the first data resource, the called idle computing resource needs to be removed from the residual resource unit, so as to avoid the situation that other data conversion service requests call the currently in-use computing resource again to cause request failure, obtain the residual resource unit after one update, and obtain the residual resource unit which is already called at present.
For example, if the remaining resource unit of the target engine layer service instance is R, the updated remaining resource unit obtained after the called idle computing resource is removed from the remaining resource unit is denoted as r=r-1.
Step S512, obtaining the resource attribute information corresponding to the second data resource, and constructing a response data packet according to the second resource data and the resource attribute information.
Specifically, the engine layer server obtains the response data packet by obtaining the resource attribute information corresponding to the second data resource, specifically including an error code, error code information, sampling rate, audio format and the like corresponding to the second data resource, and constructing the response data packet according to the second resource data, the error code information, the sampling rate, the audio format and the like.
Step S514, the response data packet is fed back to the access layer server, and the response data packet is fed back to the request terminal triggering the data conversion service request through the access layer server.
Specifically, the engine layer server feeds back the response data packet to the access layer server, and the access layer server feeds back the received response data packet to the request terminal triggering the data conversion service request, so as to request the user object of the terminal to view and access.
Step S516, releasing the called idle computing resource, and adding the released idle computing resource to the residual resource unit to obtain the residual resource unit after the secondary update.
Specifically, after the engine layer server feeds back the converted response data packet to the access layer server, the called idle computing resource is further released. It can be understood that after the response data packet is obtained by conversion, the current conversion processing operation is finished, and the calculation resources are not required to be occupied continuously, so that the called idle calculation resources are released, and the released idle calculation resources are further added into the residual resource unit, so that the residual resource unit after the secondary update is obtained.
For example, if the remaining resource unit of the target engine layer service instance is R, after the released idle computing resource is added to the remaining resource unit, the obtained secondary updated remaining resource unit is denoted as r=r+1.
In the data conversion service request processing method, by carrying out delay waiting, the automatic capacity expansion and contraction function of the engine layer server can be utilized, and reasonable retry is carried out on the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. And when determining that the idle computing resources exist based on the residual computing resource limit, the target engine layer service instance calls any idle computing resource to perform data conversion service processing on the first data resource to obtain second data resources with different resource types, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the computing resource waste is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved. Further, by acquiring resource attribute information corresponding to the second data resource, constructing a response data packet according to the second resource data and the resource attribute information, feeding back the response data packet to the access layer server, feeding back the response data packet to the request terminal triggering the data conversion service request through the access layer server, releasing the called idle computing resource, adding the released idle computing resource to the residual resource limit, and obtaining the residual resource limit after secondary updating, dynamic updating of the computing resource in the target engine layer service instance is realized, and the service resource utilization rate is further improved.
In an exemplary embodiment, as shown in fig. 6, there is provided a data conversion service request processing method, involving a request terminal, an access layer server, an address storage server, and an engine layer server, specifically including the steps of:
in step S601, the requesting terminal triggers a data conversion service request and forwards the data conversion service request to the access layer server.
In step S602, the access layer server receives a data conversion service request sent by a request terminal, and acquires a first data resource carried by the data conversion service request.
In step S603, the access layer server obtains initial request state information carried by the data conversion service request, where the initial request state information includes an initial request attempt number threshold and an initial request delay time, and identifies a resource length of each first data resource, so as to obtain a data resource length corresponding to each first data resource.
In step S604, the access stratum server determines a sub-request delay time corresponding to each first data resource based on the length of each data resource and a preset weight coefficient, and obtains a preset maximum request delay time, so as to dynamically reset the initial request delay time based on each sub-request delay time and the preset maximum request delay time, and obtain a reset request delay time.
In step S605, the access stratum server sends an engine stratum service address acquisition request to the address storage server.
In step S606, the address storage server receives the engine layer service address acquisition request sent by the access layer server, and responds to the engine layer service address acquisition request to feed back an engine layer service address list corresponding to the engine layer server to the access layer server.
In step S607, the access layer server obtains the number of service instances of the engine layer in the service address list of the engine layer, and resets the initial request attempt number threshold according to the number of service instances of the engine layer, to obtain the reset request attempt number threshold.
In step S608, the request state information includes a request arrival time, and the access stratum server acquires a current time in the data conversion process, determines a time difference value based on the current time and the request arrival time, and compares the time difference value with the request delay time.
In step S609, if the time difference is not greater than the request delay time, the access layer server determines that the request state information satisfies the non-timeout processing condition, and compares the request attempt number with the request attempt number threshold.
In step S610, if it is determined that the number of request attempts is not less than the threshold number of request attempts, the access layer server determines whether the request state information satisfies the deferred waiting process condition.
In step S611, when determining that the request status information satisfies the latency waiting condition, the access layer server waits for the request latency time and then re-acquires the updated engine layer service address list, randomly selects a target engine layer service instance based on the updated engine layer service address list, and forwards the data conversion service request to the target engine layer service instance.
In step S612, the engine layer server obtains the remaining computing resource amount, and determines whether the idle computing resource exists in the target engine layer service instance according to the remaining computing resource amount.
In step S613, if it is determined that there is no idle computing resource, the access layer server reselects a new target engine layer service instance based on the updated engine layer service address list.
In step S614, if the engine layer server determines that the target engine layer service instance has idle computing resources, any idle computing resource is called by the target engine layer service instance, and the data conversion service processing is performed on the first data resource, so as to obtain a second data resource.
In step S615, the engine layer server eliminates the called idle computing resource from the remaining resource unit, and obtains the remaining resource unit after one update.
In step S616, the engine layer server obtains the resource attribute information corresponding to the second data resource, constructs a response data packet according to the second resource data and the resource attribute information, and feeds back the response data packet to the access layer server.
In step S617, the engine layer server releases the invoked idle computing resources, and adds the released idle computing resources to the remaining resource quota to obtain a secondary updated remaining resource quota.
In step S618, the access stratum server feeds back the response data packet to the requesting terminal that triggered the data conversion service request.
In the data conversion service request processing method, when the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is obtained again after waiting for the request delay time, and in the delay waiting process, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the obtained updated re-engine layer service address list, so that the request failure rate is reduced. Further, if it is determined that the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is performed on the first data resource, and second data resources with different resource types from the first data resource are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, as shown in fig. 7, a complete processing flow of a data conversion service request processing method is provided, which specifically includes the following steps:
step 1, a request terminal initiates a data conversion service request to an access layer server, wherein the data conversion service request carries first data resources.
Step 2, the access layer server initializes the request state information of the data conversion service request.
After receiving the data conversion service request, the access layer server acquires initial request state information carried by the data conversion service request, and resets the initial request state information to obtain the reset request state information. The initial request state information specifically includes an initial request trigger time, an initial request attempt number threshold, and an initial request delay time, and the reset request state information specifically includes a request arrival time, a request attempt number threshold, and a request delay time.
Specifically, after receiving the data conversion service request, the access layer server resets the state information of the current request, including resetting the initial request triggering time of the data conversion service request to the request reaching time TimeStart, and resetting the initial request attempt number possibly including the history request number to the request attempt number Retrycnt=1.
Similarly, the number of engine layer service instances in the engine layer service address list is obtained in real time, for example, specifically including 11 engine layer service instances corresponding to IP addresses such as IP0, IP1, IP2, … …, IP10, etc., and then the fixed initial request attempt number threshold (for example, 5 times) is reset to be the request attempt number threshold retrymax=10 (where the request attempt number threshold RetryMax needs to be smaller than the number of engine layer service instances).
Further, the resource length identification is performed on each first data resource, so that the data resource length corresponding to each first data resource is obtained, the initial request delay time is dynamically reset according to each data resource length, and the request delay time after reset is obtained. The method comprises the steps of obtaining preset weight coefficients, determining request delay time corresponding to each first data resource according to the lengths of the data resources and the preset weight coefficients, and dynamically resetting fixed initial request delay time to be the determined request delay time.
Illustratively, the request delay time delay corresponding to the first data resource is determined by the formula (1), "delay=len (Text) ×0.1". The delay is a request delay time, len (Text) represents a resource length of a first data resource of a Text type, and a preset weight coefficient is 0.1.
And step 3, the access layer server triggers an engine layer service address acquisition request and sends the engine layer service address acquisition request to the address storage server to acquire an engine layer service address list corresponding to the engine layer server, which is fed back by the address storage server.
Specifically, the IP addresses of all instances of the downstream engine layer server, that is, the engine layer service address list ipist= { IP0, IP1, …, IP10}, are obtained.
And step 4, the access layer server initiates a data conversion service request to the engine layer service. This step requires a request retry procedure, comprising the steps of:
and 4.1, acquiring the current time in the data conversion process, and determining whether the request state information meets the non-timeout processing condition based on the current time, the request arrival time and the request delay time.
Specifically, the current time TimeCurr is obtained, the time difference TimeCurr-TimeStart is determined based on the current time TimeCurr and the request arrival time TimeStart, and the time difference TimeCurr-TimeStart and the request delay time delay are compared.
If the TimeCurr-TimeStart > delay, the request processing timeout is identified, the non-timeout processing condition is not satisfied, a timeout error code ErrorNo=11 is returned to the request terminal, and the whole synthesis process is ended. If TimeCurr-TimeStart is less than or equal to delay, the time is not exceeded, the processing condition of the time is met, and the subsequent step 4.2 is executed.
And 4.2, if the request state information is determined to meet the non-timeout processing condition, determining whether the request state information meets the delay waiting processing condition or not based on the request try times and the request try times threshold value.
Specifically, if it is determined that the request state information satisfies the non-timeout processing condition, the request attempt number RetryCnt and the request attempt number threshold RetryMax are compared.
If the request try number RetryCnt is smaller than the request try number threshold RetryMax, the delay wait processing condition is not satisfied, that is, the delay wait processing is not performed.
Conversely, if the request attempt number RetryCnt is equal to or greater than the request attempt number threshold RetryMax, it is determined that the deferred-waiting processing condition is satisfied. The method comprises the steps of determining that request state information meets a delay waiting processing condition, re-acquiring an updated engine layer service address list after waiting for a request delay time, namely, after waiting for delay seconds, initiating a request to acquire IP addresses of all instances in a downstream engine layer server to an address storage server again, updating the engine layer service address list IPList= { IP0, IP1, …, IP10}, and resetting request attempt number retrycnt=1.
And 4.3, if the request state information is determined to meet the delay waiting processing condition, acquiring the updated engine layer service address list again after waiting for the request delay time.
Step 4.4, the access layer server randomly selects a target engine layer service instance based on the engine layer service address list, and initiates a data conversion service request to the target engine layer service instance (for example, ip=ip0), where the data conversion service request carries a first data resource.
Wherein the retry status is further updated after the target engine layer service instance is selected. Specifically, by deleting the address IP from the engine layer service address list ipist (e.g., rejecting ip=ip0), and updating the engine layer service address list ipist= { IP1, …, IP10}, the request attempt number retrycnt=retrycnt+1 is updated.
And step 5, after the target engine layer service instance receives the data conversion service request forwarded by the access layer server, acquiring the current residual computing resource limit of the target engine layer service instance, and determining whether idle computing resources exist or not based on the residual computing resource limit.
Specifically, the total computing resource amount of a single engine layer service instance is s=8, and is generally set to be the number of CPUs (typically 8 CPUs), that is, the remaining computing resource amount r=s=8 at the beginning of the engine layer service instance. And after receiving the data conversion service request, the target engine layer service instance (for example, ip=ip0) determines whether the current remaining computing resource quota R is greater than 0. If the remaining computing resource limit R >0, it indicates that there are idle computing resources in the service instance of the target engine layer (for example, ip=ip0), and the data conversion service process can be performed. Conversely, if the current remaining computing resource limit R is not greater than 0, an error code error no=10 is returned to the access layer server, and step 4 is skipped to reselect a new target engine layer service instance based on the updated engine layer service address list.
And step 6, if the idle computing resources are determined to exist, any idle computing resource is called through the target engine layer service instance, data conversion service processing is carried out on the first data resource, a second data resource is obtained through conversion, the called idle computing resource is removed from the residual resource amount, and the residual resource amount after one-time updating is obtained.
Specifically, the engine layer service instance (such as ip=ip0) converts the first data resource carried by the data conversion service request into the second data resource. The first data resource may be a Text type data resource, and the second data resource may be an Audio type data resource, that is, a Text is used as an input of the target engine layer service instance, and a segment of synthesized Audio is output.
When the target engine layer service instance occupies any computing resource to perform conversion processing, the called idle computing resource needs to be removed from the remaining resource unit to update the resource state, that is, the target engine layer service instance (e.g., ip=ip0) updates the remaining computing resource unit r=r-1.
And 7, the engine layer server acquires resource attribute information corresponding to the second data resource, and constructs a response data packet according to the second resource data and the resource attribute information.
The target engine layer service instance (for example, ip=ip0) constructs a response data packet based on the synthesized Audio and the resource attribute information (specifically including error code, error code information, sampling rate, audio format, etc.) corresponding to the synthesized Audio.
And 8, releasing the called idle computing resources when the engine layer server feeds back the response data packet to the access layer server, and adding the released idle computing resources into the residual resource limit to obtain the residual resource limit after secondary updating.
Specifically, when the engine layer server feeds back the response data packet to the access layer server, the engine layer server releases the occupied computing resource and updates the resource state, i.e. the engine layer service instance (for example, ip=ip0), releases one occupied computing resource and updates the remaining computing resource limit r=r+1.
And 9, the engine layer server feeds back the response data packet to the access layer server, and feeds back the response data packet to the request terminal triggering the data conversion service request through the access layer server.
Specifically, the engine layer server feeds back the response data packet to the access layer server, and after receiving the response data packet fed back by the engine layer service instance (for example, ip=ip0), the access layer server forwards the response data packet to the request terminal so as to end the whole data conversion processing procedure.
In the data conversion service request processing method, when the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is obtained again after waiting for the request delay time, and in the delay waiting process, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the obtained updated re-engine layer service address list, so that the request failure rate is reduced. Further, if it is determined that the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is performed on the first data resource, and second data resources with different resource types from the first data resource are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In one embodiment, as shown in fig. 8, a data conversion service request processing system is provided, which specifically includes an access layer server 802 and an engine layer server 804, the engine layer server 804 including a plurality of engine layer service instances 806, wherein,
The access stratum server 802 is configured to: receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information; acquiring an engine layer service address list corresponding to the engine layer server, and re-acquiring an updated engine layer service address list after waiting for the delay time of the request if the request state information is determined to meet the delay waiting processing condition; randomly selecting a target engine layer service instance 806 based on the updated engine layer service address list, and forwarding the data conversion service request to the target engine layer service instance 806;
the engine layer server 804 is configured to: if it is determined that the idle computing resources exist in the target engine layer service instance 806, any idle computing resource is called by the target engine layer service instance 806, and data conversion service processing is performed on the first data resource, so that a second data resource is obtained through conversion, where the first data resource and the second data resource are respectively of different resource types.
In the data conversion service request processing system, the first data resource carried by the data conversion service request and the reset request state information are acquired by receiving the data conversion service request, and the engine layer service address list corresponding to the engine layer server is acquired. Further, if the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is re-acquired after waiting for the request delay time, and in the delay waiting process, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, a target engine layer service instance is randomly selected based on the updated engine layer service address list, a data conversion service request is forwarded to the target engine layer service instance, if the target engine layer service instance is determined to have idle computing resources, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, the first data resource and the second data resource with different resource types are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of the computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In one embodiment, as shown in fig. 9, there is provided a data conversion service request processing system, which specifically includes a request terminal 902, an access layer server 904, an address storage server 906, and an engine layer server 908, wherein the engine layer server 908 includes a plurality of engine layer service instances 910, wherein:
the request terminal 902 is configured to: triggering a data conversion service request and forwarding the data conversion service request to the access stratum server 904;
the access stratum server 904 is configured to: receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information; the engine layer service address acquisition request is sent to the address storage server 906, and an engine layer service address list corresponding to the engine layer server fed back by the address storage server 906 is acquired.
An address storage server 906 for: and receiving an engine layer service address acquisition request sent by the access layer server 904, and responding to the engine layer service address acquisition request, and feeding back an engine layer service address list corresponding to the engine layer server to the access layer server 904. Wherein each engine layer service instance 910 registers and synchronizes the address or information of the respective instance on the address storage server 906 at timing.
The access stratum server 904 is further configured to: acquiring an engine layer service address list corresponding to the engine layer server 908, and if the request state information is determined to meet the delay waiting processing condition, re-acquiring the updated engine layer service address list after waiting for the request delay time; a target engine layer service instance 910 is randomly selected based on the updated engine layer service address list and the data conversion service request is forwarded to the target engine layer service instance 910.
The engine layer server 908 is configured to: if it is determined that the idle computing resources exist in the target engine layer service instance 910, any idle computing resource is called by the target engine layer service instance 910, and data conversion service processing is performed on the first data resource, so that a second data resource is obtained through conversion, wherein the first data resource and the second data resource are respectively of different resource types; acquiring resource attribute information corresponding to the second data resource, and constructing a response data packet according to the second resource data and the resource attribute information; the response packet is fed back to the access stratum server 904.
The access stratum server 904 is further configured to: the response data packet is fed back to the requesting terminal 902 that triggered the data conversion service request.
In an exemplary embodiment, referring to fig. 9, the requesting terminal 902 triggers a data conversion service request and forwards the data conversion service request to the access layer server 904, where the access layer server 904 pulls each engine layer service instance 910 from the address storage server 906, and registers and synchronizes data such as an address or information of each instance on the address storage server, that is, an engine layer service address list corresponding to each engine layer service instance 910 in the engine layer server 908 is available through the address storage server 906.
As can be seen from fig. 9, each engine layer service instance corresponds to a different IP address, and includes a plurality of engine layer service instances corresponding to IP addresses such as IP0, IP1, IP2, … …, IP10, etc.
In the data conversion service request processing system, the first data resource carried by the data conversion service request is acquired by receiving the data conversion service request, the initial request state information carried by the data conversion service request is acquired, and the reset processing is carried out on the initial request state information to acquire the reset request state information. The method comprises the steps of obtaining the current time in the data conversion process, determining whether the request state information meets the non-timeout processing condition based on the current time, the request arrival time and the request delay time, and determining whether the request state information meets the delay waiting processing condition based on the request try times and the request try times threshold when the request state information is determined to meet the non-timeout processing condition. Further, by acquiring the engine layer service address list corresponding to the engine layer server, and when the request state information is determined to meet the delay waiting processing condition, waiting for the request delay time and then re-acquiring the updated engine layer service address list, a target engine layer service instance is randomly selected based on the updated engine layer service address list, and the data conversion service request is forwarded to the target engine layer service instance, the automatic capacity expansion function of the engine layer server can be utilized, and reasonable retry is performed on the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, when it is determined that the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is performed on the first data resource, and second data resource is obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data conversion service request processing device for implementing the above related data conversion service request processing method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the data conversion service request processing apparatus provided in the following may refer to the limitation of the data conversion service request processing method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 10, there is provided a data conversion service request processing apparatus including: a data conversion service request receiving module 1002, an engine layer service address list obtaining module 1004, a data conversion service request forwarding module 1006, and a second data resource obtaining module 1008, wherein:
a data conversion service request receiving module 1002, configured to receive a data conversion service request, and obtain a first data resource carried by the data conversion service request and reset request state information;
the engine layer service address list obtaining module 1004 is configured to obtain an engine layer service address list corresponding to the engine layer server, and re-obtain the updated engine layer service address list after waiting for the delay time of the request if it is determined that the request state information meets the delay processing condition;
a data conversion service request forwarding module 1006, configured to randomly select a target engine layer service instance based on the updated engine layer service address list, and forward the data conversion service request to the target engine layer service instance;
the second data resource obtaining module 1008 is configured to instruct the target engine layer service instance to invoke any idle computing resource if it is determined that the idle computing resource exists in the target engine layer service instance, perform data conversion service processing on the first data resource, and convert the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
In the data conversion service request processing device, the first data resource carried by the data conversion service request and the reset request state information are acquired by receiving the data conversion service request, and the engine layer service address list corresponding to the engine layer server is acquired. Further, if the request state information is determined to meet the delay waiting processing condition, the updated engine layer service address list is re-acquired after waiting for the request delay time, and in the delay waiting process, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, a target engine layer service instance is randomly selected based on the updated engine layer service address list, a data conversion service request is forwarded to the target engine layer service instance, if the target engine layer service instance is determined to have idle computing resources, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, the first data resource and the second data resource with different resource types are obtained through conversion, so that the idle computing resources existing in the target engine layer service instance are effectively utilized, the waste of the computing resources is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, there is provided a data conversion service request processing apparatus, further including:
the reset processing module is used for acquiring initial request state information carried by the data conversion service request, and carrying out reset processing on the initial request state information to acquire reset request state information; the request state information comprises request reaching time, request try times threshold value and request delay time;
the first determining module is used for acquiring the current time in the data conversion process and determining whether the request state information meets the non-timeout processing condition or not based on the current time, the request arrival time and the request delay time;
and the second determining module is used for determining whether the request state information meets the delay waiting processing condition or not based on the request try times and the request try times threshold value if the request state information meets the non-timeout processing condition.
In an exemplary embodiment, the reset processing module is further configured to: the resource length identification is carried out on each first data resource, the data resource length corresponding to each first data resource is obtained, the dynamic reset processing is carried out on the initial request delay time according to each data resource length, and the request delay time after the reset is obtained; and obtaining the number of the engine layer service instances in the engine layer service address list, and carrying out reset processing on the initial request try number threshold according to the number of the engine layer service instances to obtain the reset request try number threshold.
In an exemplary embodiment, the reset processing module is further configured to: determining sub-request delay time corresponding to each first data resource based on the lengths of the data resources and a preset weight coefficient; acquiring preset maximum request delay time, and carrying out dynamic reset processing on the initial request delay time based on each sub-request delay time and the preset maximum request delay time to acquire the reset request delay time.
In an exemplary embodiment, the first determining module is further configured to: determining a time difference value based on the current time and the request arrival time, and comparing the time difference value with the request delay time; if the time difference value is larger than the request delay time, the request state information is determined to not meet the non-overtime processing condition; and if the time difference value is not larger than the request delay time, determining that the request state information meets the non-timeout processing condition.
In an exemplary embodiment, the second determining module is further configured to: if the request state information is determined to meet the non-timeout processing condition, comparing the request try times with a request try times threshold; if the request try number is not less than the request try number threshold, determining that the request state information meets the delay waiting processing condition; if the request attempt number is determined to be smaller than the request attempt number threshold, it is determined that the request state information does not satisfy the latency processing condition.
In an exemplary embodiment, a data conversion service request processing apparatus is provided, further including a free computing resource determining module configured to: indicating the target engine layer service instance to acquire the residual computing resource limit, and determining whether idle computing resources exist in the target engine layer service instance according to the residual computing resource limit; and if the idle computing resources are not determined to exist, reselecting a new target engine layer service instance based on the updated engine layer service address list.
In an exemplary embodiment, as shown in fig. 11, there is provided a data conversion service request processing apparatus including: an engine layer service address list feedback module 1102, a first data resource acquisition module 1104, a remaining computing resource credit acquisition module 1106, and a data conversion service processing module 1108, wherein:
the engine layer service address list feedback module 1102 is configured to receive a data conversion service request forwarded by the access layer server, and feed back a current engine layer service address list to the access layer through the address storage server; the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer after waiting for the request delay time when determining that the delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance;
A first data resource obtaining module 1104, configured to obtain a first data resource carried by the data conversion service request;
a remaining computing resource amount obtaining module 1106, configured to obtain a current remaining computing resource amount of the target engine layer service instance, and determine whether there is a free computing resource based on the remaining computing resource amount;
the data conversion service processing module 1108 is configured to invoke any idle computing resource by the target engine layer service instance if it is determined that the idle computing resource exists, perform data conversion service processing on the first data resource, and convert the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
In the data conversion service request processing device, the current engine layer service address list is fed back to the access layer through the address storage server by receiving the data conversion service request forwarded by the access layer server. The data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer after waiting for the request delay time when determining that the delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance. By performing delay waiting, the automatic capacity expansion and contraction function of the engine layer server can be utilized to reasonably retry the re-acquired updated re-engine layer service address list, so that the request failure rate is reduced. Further, by acquiring the first data resource carried by the data conversion service request and acquiring the current residual computing resource limit of the target engine layer service instance, when determining that the idle computing resource exists based on the residual computing resource limit, any idle computing resource is called by the target engine layer service instance, the data conversion service processing is performed on the first data resource, and the second data resource with different resource types is obtained through conversion, so that the idle computing resource existing in the target engine layer service instance is effectively utilized, the computing resource waste is avoided, and meanwhile, the processing efficiency of the data conversion service request is improved.
In an exemplary embodiment, there is provided a data conversion service request processing apparatus, further including:
the response data packet construction module is used for acquiring resource attribute information corresponding to the second data resource and constructing a response data packet according to the second resource data and the resource attribute information;
and the response data packet feedback module is used for feeding back the response data packet to the access layer server and feeding back the response data packet to the request terminal triggering the data conversion service request through the access layer server.
In an exemplary embodiment, there is provided a data conversion service request processing apparatus, further including:
the primary updating module is used for removing the called idle computing resources from the residual resource unit when any idle computing resource is called, carrying out data conversion service processing on the first data resource and obtaining a second data resource through conversion, and obtaining the residual resource unit after primary updating;
and the secondary updating module is used for releasing the called idle computing resources when the response data packet is fed back to the access layer server, and adding the released idle computing resources into the residual resource unit to obtain the residual resource unit after secondary updating.
The respective modules in the above-described data conversion service request processing apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as a first data resource, reset request state information, an engine layer service address list, an updated engine layer service address list, a target engine layer service instance, idle computing resources, a second data resource and the like. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a data conversion service request processing method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps in the data conversion service request processing method described above when the computer program is executed.
In one exemplary embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the steps of the data conversion service request processing method described above.
In an exemplary embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the data conversion service request processing method described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A method for processing a data conversion service request, the method comprising:
receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information;
acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for a request delay time if the request state information is determined to meet a delay waiting processing condition;
Randomly selecting a target engine layer service instance based on the updated engine layer service address list, and forwarding the data conversion service request to the target engine layer service instance;
if the idle computing resources exist in the target engine layer service instance, the target engine layer service instance is instructed to call any idle computing resource, data conversion service processing is carried out on the first data resource, and a second data resource is obtained through conversion; the first data resource and the second data resource are respectively of different resource types.
2. The method of claim 1, wherein upon receiving a data conversion service request, the method further comprises: acquiring initial request state information carried by the data conversion service request, and carrying out reset processing on the initial request state information to acquire reset request state information; the request state information comprises request reaching time, request try times threshold value and request delay time;
after the receiving the data conversion service request and obtaining the first data resource carried by the data conversion service request and the reset request state information, the method further comprises the following steps:
Acquiring the current time in the data conversion process, and determining whether the request state information meets an overtime processing condition or not based on the current time, the request arrival time and the request delay time;
if the request state information is determined to meet the non-timeout processing condition, determining whether the request state information meets the delay waiting processing condition or not based on the request try times and the request try times threshold value.
3. The method of claim 2, wherein the initial request state information includes an initial request attempt number threshold and an initial request delay time; resetting the initial request state information to obtain reset request state information, wherein the method comprises the following steps:
performing resource length identification on each first data resource to obtain a data resource length corresponding to each first data resource, and performing dynamic reset processing on the initial request delay time according to each data resource length to obtain a reset request delay time;
and obtaining the number of engine layer service instances in the engine layer service address list, and carrying out reset processing on the initial request try number threshold according to the number of engine layer service instances to obtain the reset request try number threshold.
4. A method according to claim 3, wherein dynamically resetting the initial request delay time according to each data resource length to obtain a reset request delay time comprises:
determining sub-request delay time corresponding to each first data resource based on the length of each data resource and a preset weight coefficient;
acquiring preset maximum request delay time, and carrying out dynamic reset processing on the initial request delay time based on each sub-request delay time and the preset maximum request delay time to acquire the reset request delay time.
5. The method of any of claims 2 to 4, wherein determining whether the request state information satisfies an un-timeout processing condition based on the current time, the request arrival time, and the request delay time comprises:
determining a time difference value based on the current time and the request arrival time, and comparing the time difference value with the request delay time;
if the time difference value is determined to be larger than the request delay time, determining that the request state information does not meet the non-timeout processing condition;
And if the time difference value is not larger than the request delay time, determining that the request state information meets the non-timeout processing condition.
6. The method according to any one of claims 2 to 4, wherein if it is determined that the request state information satisfies an un-timeout processing condition, determining whether the request state information satisfies a latency waiting processing condition based on the request attempt number and the request attempt number threshold value includes:
if the request state information is determined to meet the non-timeout processing condition, comparing the request try times with the request try times threshold;
if the request try times are not smaller than the request try times threshold, determining that the request state information meets a delay waiting processing condition;
and if the request try number is smaller than the request try number threshold, determining that the request state information does not meet the delay waiting processing condition.
7. The method of any of claims 1 to 4, further comprising, after said randomly selecting a target engine layer service instance based on said updated engine layer service address list and forwarding said data translation service request to said target engine layer service instance:
Indicating the target engine layer service instance to acquire the residual computing resource limit, and determining whether idle computing resources exist in the target engine layer service instance according to the residual computing resource limit;
and if the idle computing resources are not determined to exist, reselecting a new target engine layer service instance based on the updated engine layer service address list.
8. A method for processing a data conversion service request, the method comprising:
receiving a data conversion service request forwarded by an access layer server, and feeding back a current engine layer service address list to the access layer through an address storage server; the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance;
acquiring a first data resource carried by the data conversion service request;
acquiring the current residual computing resource limit of the target engine layer service instance, and determining whether idle computing resources exist or not based on the residual computing resource limit;
If the idle computing resources are determined to exist, any idle computing resource is called through the target engine layer service instance, and data conversion service processing is carried out on the first data resource, so that a second data resource is obtained through conversion; the first data resource and the second data resource are respectively of different resource types.
9. The method of claim 8, wherein after the step of invoking any one of the idle computing resources by the target engine layer service instance if it is determined that the idle computing resource exists, performing a data conversion service process on the first data resource, and converting the first data resource to obtain a second data resource, further comprising:
acquiring resource attribute information corresponding to the second data resource, and constructing a response data packet according to the second resource data and the resource attribute information;
and feeding back the response data packet to the access layer server, and feeding back the response data packet to a request terminal triggering the data conversion service request through the access layer server.
10. The method of claim 9, wherein when any of the idle computing resources is invoked to perform data conversion service processing on the first data resource to obtain a second data resource, the method further comprises: rejecting the called idle computing resource from the residual resource limit to obtain a residual resource limit after one-time updating;
Upon feeding back the response data packet to the access stratum server, the method further comprises: releasing the called idle computing resource, and adding the released idle computing resource to the residual resource quota to obtain a residual resource quota after secondary updating.
11. A data conversion service request processing system, wherein the system comprises an access layer server and an engine layer server, the engine layer server comprising a plurality of engine layer service instances; wherein:
the access layer server is used for: receiving a data conversion service request, and acquiring a first data resource carried by the data conversion service request and reset request state information; acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for a request delay time if the request state information is determined to meet a delay waiting processing condition; randomly selecting a target engine layer service instance based on the updated engine layer service address list, and forwarding the data conversion service request to the target engine layer service instance;
The engine layer server is used for: and if the idle computing resources exist in the target engine layer service instance, calling any idle computing resource through the target engine layer service instance, performing data conversion service processing on the first data resource, and converting the first data resource into a second data resource, wherein the first data resource and the second data resource are respectively of different resource types.
12. The system of claim 11, further comprising a requesting terminal, an address storage server; wherein:
the request terminal is used for: triggering a data conversion service request and forwarding the data conversion service request to the access layer server;
the access layer server is further configured to: sending an engine layer service address acquisition request to the address storage server, and acquiring an engine layer service address list which is fed back by the address storage server and corresponds to the engine layer server;
the address storage server is used for: receiving an engine layer service address acquisition request sent by the access layer server, responding to the engine layer service address acquisition request, and feeding back an engine layer service address list corresponding to the engine layer server to the access layer server;
The engine layer server is further configured to: acquiring resource attribute information corresponding to the second data resource, and constructing a response data packet according to the second resource data and the resource attribute information; feeding back the response data packet to the access layer server;
the access layer server is further configured to: and feeding the response data packet back to the request terminal triggering the data conversion service request.
13. A data conversion service request processing apparatus, the apparatus comprising:
the data conversion service request receiving module is used for receiving a data conversion service request and acquiring first data resources carried by the data conversion service request and reset request state information;
the engine layer service address list acquisition module is used for acquiring an engine layer service address list corresponding to an engine layer server, and re-acquiring the updated engine layer service address list after waiting for the request delay time if the request state information is determined to meet the delay waiting processing condition;
the data conversion service request forwarding module is used for randomly selecting a target engine layer service instance based on the updated engine layer service address list and forwarding the data conversion service request to the target engine layer service instance;
The second data resource obtaining module is used for indicating the target engine layer service instance to call any idle computing resource if the idle computing resource exists in the target engine layer service instance, and carrying out data conversion service processing on the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
14. A data conversion service request processing apparatus, the apparatus comprising:
the engine layer service address list feedback module is used for receiving the data conversion service request forwarded by the access layer server and feeding back the current engine layer service address list to the access layer through the address storage server; the data conversion service request carries reset request state information, the request state information is used for feeding back an updated engine layer service address list to the access layer again after waiting for a request delay time when determining that a delay waiting processing condition is met currently, and the updated engine layer service address list is used for determining a target engine layer service instance;
the first data resource acquisition module is used for acquiring a first data resource carried by the data conversion service request;
The residual computing resource limit acquisition module is used for acquiring the current residual computing resource limit of the target engine layer service instance and determining whether idle computing resources exist or not based on the residual computing resource limit;
the data conversion service processing module is used for calling any idle computing resource through the target engine layer service instance if the idle computing resource exists, and performing data conversion service processing on the first data resource to obtain a second data resource; the first data resource and the second data resource are respectively of different resource types.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 10 when the computer program is executed.
CN202311323713.7A 2023-10-13 2023-10-13 Data conversion service request processing method, system, device and computer equipment Active CN117076544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311323713.7A CN117076544B (en) 2023-10-13 2023-10-13 Data conversion service request processing method, system, device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311323713.7A CN117076544B (en) 2023-10-13 2023-10-13 Data conversion service request processing method, system, device and computer equipment

Publications (2)

Publication Number Publication Date
CN117076544A true CN117076544A (en) 2023-11-17
CN117076544B CN117076544B (en) 2024-01-26

Family

ID=88711991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311323713.7A Active CN117076544B (en) 2023-10-13 2023-10-13 Data conversion service request processing method, system, device and computer equipment

Country Status (1)

Country Link
CN (1) CN117076544B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874134A (en) * 2023-12-23 2024-04-12 曙光云计算集团股份有限公司 Data synchronization method, device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10067691B1 (en) * 2017-03-02 2018-09-04 Qualcomm Incorporated System and method for dynamic control of shared memory management resources
EP3503503A1 (en) * 2017-12-21 2019-06-26 Apple Inc. Health status monitoring for services provided by computing devices
CN110572694A (en) * 2019-07-30 2019-12-13 视联动力信息技术股份有限公司 Video data processing method and device, electronic equipment and storage medium
CN112905183A (en) * 2019-12-04 2021-06-04 广州凡科互联网科技股份有限公司 External data conversion mapping method for flow form
CN112965901A (en) * 2021-03-05 2021-06-15 北京百度网讯科技有限公司 API testing method, server, system and electronic equipment
CN116368355A (en) * 2021-09-05 2023-06-30 汉熵通信有限公司 Internet of things system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10067691B1 (en) * 2017-03-02 2018-09-04 Qualcomm Incorporated System and method for dynamic control of shared memory management resources
EP3503503A1 (en) * 2017-12-21 2019-06-26 Apple Inc. Health status monitoring for services provided by computing devices
CN110572694A (en) * 2019-07-30 2019-12-13 视联动力信息技术股份有限公司 Video data processing method and device, electronic equipment and storage medium
CN112905183A (en) * 2019-12-04 2021-06-04 广州凡科互联网科技股份有限公司 External data conversion mapping method for flow form
CN112965901A (en) * 2021-03-05 2021-06-15 北京百度网讯科技有限公司 API testing method, server, system and electronic equipment
CN116368355A (en) * 2021-09-05 2023-06-30 汉熵通信有限公司 Internet of things system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
叶荣青: "基于SOA的省级地理信息公共服务平台研究", 测绘标准化, vol. 26, no. 2, pages 12 - 15 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874134A (en) * 2023-12-23 2024-04-12 曙光云计算集团股份有限公司 Data synchronization method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117076544B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN117076544B (en) Data conversion service request processing method, system, device and computer equipment
US9215203B2 (en) System and method for efficient unified messaging system support for speech-to-text service
US10594840B1 (en) Bot framework for channel agnostic applications
WO2022257247A1 (en) Data processing method and apparatus, and computer-readable storage medium
US20240046951A1 (en) Speech image providing method and computing device for performing the same
CN110750295B (en) Information processing method, device, electronic equipment and storage medium
CN108287859B (en) Multimedia information retrieval method and device
CN117407498A (en) Large language model reply method, system, terminal and medium capable of automatically adjusting prompt words
CN116009985A (en) Interface calling method, device, computer equipment and storage medium
CN114222028A (en) Speech recognition method, speech recognition device, computer equipment and storage medium
CN111832692A (en) Data processing method, device, terminal and storage medium
CN113010674B (en) Text classification model packaging method, text classification method and related equipment
CN118354091A (en) Transcoding method, apparatus, computer device, storage medium and program product
CN117033664B (en) Service sequence diagram generation method, device, computer equipment and storage medium
CN115794444B (en) Event communication method, event communication device, computer equipment and computer readable storage medium
CN109117284A (en) Processing method, device, equipment and the storage medium of solicited message
CN117135371A (en) Communication method, device, equipment and storage medium based on multimedia type
US11830120B2 (en) Speech image providing method and computing device for performing the same
CN117132348A (en) Resource interaction method, device, computer equipment and storage medium
WO2022261928A1 (en) Operation acceleration method and operation accelerator
CN118535355A (en) Output assisting method, apparatus, computer device, readable storage medium, and program product applied to large model
CN114898739A (en) Voice call response processing method and device, computer equipment and storage medium
CN117061511A (en) Remote desktop service construction method, device, computer equipment and storage medium
CN116980484A (en) Request processing method, device, computer equipment and computer readable storage medium
CN117113088A (en) Model generation method, characterization generation method, device and electronic equipment

Legal Events

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