[go: up one dir, main page]

CN113051085B - Service calling method, device, server and storage medium - Google Patents

Service calling method, device, server and storage medium Download PDF

Info

Publication number
CN113051085B
CN113051085B CN202011585190.XA CN202011585190A CN113051085B CN 113051085 B CN113051085 B CN 113051085B CN 202011585190 A CN202011585190 A CN 202011585190A CN 113051085 B CN113051085 B CN 113051085B
Authority
CN
China
Prior art keywords
media content
scoring
service
score
waiting time
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.)
Active
Application number
CN202011585190.XA
Other languages
Chinese (zh)
Other versions
CN113051085A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011585190.XA priority Critical patent/CN113051085B/en
Publication of CN113051085A publication Critical patent/CN113051085A/en
Application granted granted Critical
Publication of CN113051085B publication Critical patent/CN113051085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a service calling method, a device, a server and a storage medium, wherein the method comprises the following steps: when receiving media content uploaded by an account, calling a media content scoring service to score the media content; when the media content scoring service fails to score the media content within a preset first waiting time, recording the scoring failure times corresponding to the media content, and recording the processing state identification of the media content as a scoring failure identification; determining target media content in the media content processed by the media content scoring service according to a preset time interval; the processing state identifier of the target media content is a scoring failure identifier, and the scoring failure frequency of the target media content is smaller than a preset frequency threshold; and re-calling the media content scoring service to score the target media content. The method and the device can improve the high availability degree when the media content is scored.

Description

Service calling method, device, server and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a service calling method, a device, a server and a storage medium.
Background
With the development of smart phone technology, the functions of smart phones are becoming more and more abundant. Today, users often use a karaoke application installed on a smart phone to perform karaoke and determine scores corresponding to karaoke works sung by the users through the karaoke application.
However, scoring media content such as K-song works often requires a set of complex algorithms at the back, which takes a long time to process, has a large delay and is easily affected by network fluctuation, so that the high availability of scoring media content such as K-song works is not high.
Disclosure of Invention
The disclosure provides a service calling method, a device, electronic equipment and a storage medium, which at least solve the problem of low high availability of scoring media contents such as K song works in the related technology. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a service invocation method, including:
When receiving media content uploaded by an account, calling a media content scoring service to score the media content;
When the media content scoring service fails to score the media content within a preset first waiting time, recording the scoring failure times corresponding to the media content, and recording the processing state identification of the media content as a scoring failure identification; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content;
When the scoring failure times are smaller than a preset time threshold, the media content scoring service is called at regular time according to a preset time interval to score the media content again until the media content scoring service finishes scoring the media content within a preset second waiting time; the second waiting time is greater than the first waiting time.
In one possible implementation, after the step of calling a media content scoring service to score the media content, the method further includes:
and if the media content scoring result returned by the media content scoring service for the media content is obtained in the first waiting time, returning the media content scoring result to the account.
In one possible implementation, after the step of calling a media content scoring service to score the media content, the method further includes:
If the media content scoring result returned by the media content scoring service for the media content cannot be obtained in the first waiting time, determining that the media content scoring service cannot score the media content in the preset first waiting time.
In one possible implementation, after the step of calling a media content scoring service to score the media content, the method further includes:
And if the scoring processing abnormal message returned by the media content scoring service for the media content is acquired in the first waiting time, determining that the media content scoring service fails to score the media content in the preset first waiting time.
In one possible implementation, the recalling the media content scoring service to score the target media content includes:
If the media content scoring service fails to score the target media content within the preset second waiting time, adding an operation to the scoring failure times of the target media content; wherein the second latency is greater than the first latency;
If the scoring failure frequency after the operation is added is greater than or equal to the preset frequency threshold, generating scoring abnormal alarm; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
In one possible implementation, the recalling the media content scoring service to score the target media content includes:
and if the media content scoring result returned by the media content scoring service for the target media content is obtained in the second waiting time, returning the media content scoring result to the account.
In one possible implementation, the recalling the media content scoring service to score the target media content includes:
if the media content scoring result returned by the media content scoring service for the target media content cannot be obtained in the second waiting time, determining that the media content scoring service cannot score the target media content in the preset second waiting time.
In one possible implementation, the recalling the media content scoring service to score the target media content includes:
and if the scoring processing abnormal message returned by the media content scoring service for the target media content is acquired in the second waiting time, determining that the media content scoring service fails to score the target media content in the preset second waiting time.
According to a second aspect of the embodiments of the present disclosure, there is provided a service invocation apparatus including:
An initial calling unit configured to execute a scoring process for calling a media content scoring service to score the media content when receiving the media content uploaded by the account;
A recording unit configured to record the number of scoring failures corresponding to the media content when the media content scoring service fails to score the media content within a preset first waiting time, and record a processing state identifier of the media content as a scoring failure identifier; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content;
A determining unit configured to perform determining a target media content among the media contents processed by the media content scoring service at a preset time interval; the processing state identification of the target media content is set as a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold;
And the recall unit is configured to execute recall of the media content scoring service to score the target media content.
In one possible implementation, the apparatus further includes: and the result returning unit is configured to execute returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the media content is acquired within the first waiting time.
In one possible implementation, the apparatus further includes: the first judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the media content scoring result returned by the media content scoring service for the media content cannot be acquired in the first waiting time.
In one possible implementation, the apparatus further includes: and the second judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the scoring processing abnormal message returned by the media content scoring service for the media content is acquired within the first waiting time.
In one possible implementation manner, the recall unit is specifically configured to perform an operation of adding one to the number of scoring failures of the target media content if the media content scoring service fails to score the target media content within a preset second waiting time; wherein the second latency is greater than the first latency; if the scoring failure frequency after the operation is added is greater than or equal to the preset frequency threshold, generating scoring abnormal alarm; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
In one possible implementation, the recall unit is specifically configured to perform returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the target media content is obtained within the second waiting time.
In one possible implementation manner, the recall unit is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a media content scoring result returned by the media content scoring service for the target media content cannot be obtained within the second waiting time.
In one possible implementation manner, the recall unit is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a scoring processing exception message returned by the media content scoring service for the target media content is acquired within the second waiting time.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising a memory storing a computer program and a processor implementing the service invocation method according to the first aspect or any one of the possible implementations of the first aspect when the computer program is executed.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the service invocation method according to the first aspect or any of the possible implementations of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a computer readable storage medium, from which at least one processor of a device reads and executes the computer program, causing the device to perform the service invocation method according to any one of the possible implementations of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the method comprises the steps of calling a media content scoring service to score media content when the media content uploaded by an account is received; when the media content scoring service fails to score the media content in a preset first waiting time, recording the scoring failure times corresponding to the media content, and recording the processing state identification of the media content as a scoring failure identification; the scoring failure times are accumulated times that the scoring service of the media content fails to finish scoring the media content; determining target media content in the media content processed by the media content scoring service according to a preset time interval; the processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold; the media content scoring service is called again to score the target media content, so that when the scoring processing of the media content fails in the first waiting time for the first time, the media content scoring service is called again in the background periodically to score the media content with the failure scoring processing, each media content uploaded by the account is guaranteed to have a corresponding scoring result, and the high availability of the server for scoring the media content is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is an application environment diagram illustrating a service invocation method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a service invocation method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a service invocation method according to another exemplary embodiment.
Fig. 4 is a process flow diagram of a service invocation method, according to an example embodiment.
Fig. 5 is a block diagram illustrating a service invocation apparatus according to an exemplary embodiment.
Fig. 6 is an internal structural diagram of a server shown according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The service calling method provided by the disclosure can be applied to an application environment as shown in fig. 1. When the server 110 receives the media content uploaded by the account, the media content scoring service is called to score the media content; when the media content scoring service fails to score the media content within the preset first waiting time, the server 110 records the scoring failure times corresponding to the media content, and records the processing state identifier of the media content as a scoring failure identifier; the scoring failure times are accumulated times that the scoring service of the media content fails to finish scoring the media content; then, the server 110 determines target media content from the media content processed by the media content scoring service according to a preset time interval; the processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold; finally, the server 110 recalls the media content scoring service to score the target media content. In practical applications, the server 110 may be implemented as a stand-alone server or a server cluster formed by a plurality of servers.
Fig. 2 is a flowchart illustrating a service invocation method, as shown in fig. 2, for use in the server of fig. 1, according to an exemplary embodiment, including the following steps.
In step S210, when media content uploaded by an account is received, a media content scoring service is invoked to score the media content.
In step S220, when the media content scoring service fails to score the media content within the preset first waiting time, the scoring failure number corresponding to the media content is recorded, and the processing status identifier of the media content is recorded as the scoring failure identifier.
Wherein the scoring failure times are accumulated times that the scoring service of the media content fails to complete the scoring processing of the media content.
In step S230, a target media content is determined among media contents processed through the media content scoring service at preset time intervals.
The processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold.
In step S240, the media content scoring service is recalled to score the target media content.
The media content may refer to multimedia content that needs to be scored and uploaded by an account. Such as songs, articles, pictures, K-songs, short videos, etc.
Wherein the media content scoring service may refer to being served by an application for scoring media content. The media content scoring service is used to score, i.e., score, media content. In practical applications, the server may invoke the media content scoring service by invoking an application program interface provided by a program for scoring media content.
Wherein each media content has a corresponding processing state identification.
The processing state identifier is used for representing whether the media content scoring service finishes scoring the media content within a preset time.
Wherein the processing state identification includes at least one of a scoring failure identification and a scoring success identification.
In practical applications, the server may pre-build a data table. The data table records the processing state identification corresponding to the media content processed by the media content scoring service.
For example, when the media content scoring service successfully performs scoring processing on the media content, that is, obtains a score corresponding to the media content, the server sets a processing state identifier corresponding to the media content as a scoring success identifier, and stores the processing state identifier corresponding to the media content in the data table.
In practical application, the processing state identifier may be named as a grading state identifier; when the media content is a K song work, the data table may also be named as karaoke score history, and the media content scoring service may be named as a K song work scoring service.
Of course, the data table may also record ID information of each media content, such as a music ID, a work ID, etc., or record the number of times that the scoring service of the media content fails to score each media content, that is, the number of scoring failures.
In a specific implementation, taking media content as a K song work as an example, when a user finishes recording the K song work through a K song application program installed in the user terminal, the user terminal uploads the K song work to a server through a preset work uploading interface, and then the server receives the K song work. Then, the server stores some basic information of the K song works into the data table, for example, records the music id and the work id of the K song works in the data table, sets the number of scoring failures of the K song works as an initial value of 0, and initializes the scoring state, i.e. the processing state identification, of the K song works.
And then, the server calls the K song work scoring service to process the K song work, so as to attempt to acquire the work score for the K song work returned by the K song work scoring service. When the server fails to acquire the work grading of the K song works returned by the K song work grading service within the preset first waiting time or receives an abnormal notification returned by the K song work grading service, the server judges that the K song work grading service fails to finish grading treatment on the K song works, and at the moment, the server pauses calling the K song work grading service to grade the K song works, and records a corresponding treatment state identifier of the K song works as a grading failure identifier in a data table; meanwhile, the server can return error codes to the user terminal, so that the user is prompted to review the work scores of the K song works later. Meanwhile, the server records the scoring failure times corresponding to the K song works, namely the accumulated times that the K song works scoring service fails to complete scoring processing on the K song works.
Then, the server determines target media content in the media content processed by the media content scoring service according to a preset time interval; the processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold; finally, the server recalls the media content scoring service to score the target media content.
Specifically, taking the media content as a K song work as an example, the server may independently start a timing task and perform full-scale scanning on the data table at preset time intervals (for example, 5 minutes). The data table records the corresponding processing state identification and scoring failure times of the K song works processed by the K song work scoring service. The server can determine the target K song works from the K song works processed by the K song work scoring service based on the corresponding processing state identification and scoring failure times of each K song work. The processing state identification of the target K song works is a scoring failure identification, and the scoring failure times of the target K song works are smaller than a preset time threshold.
Of course, when the server queries the K song works whose processing status is identified as failed, and the scoring failure times are greater than the preset threshold, the server can perform alarm operation, which indicates that the K song works need to manually confirm the correctness of the data and manually mark the data.
And after the server scans the target K song works, the server recalls the K song work scoring service to score the target K song works.
In the service calling method, when media content uploaded by an account is received, a media content scoring service is called to score the media content; when the media content scoring service fails to score the media content in a preset first waiting time, recording the scoring failure times corresponding to the media content, and recording the processing state identification of the media content as a scoring failure identification; the scoring failure times are accumulated times that the scoring service of the media content fails to finish scoring the media content; determining target media content in the media content processed by the media content scoring service according to a preset time interval; the processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold; the media content scoring service is called again to score the target media content, so that when the scoring processing of the media content fails in the first waiting time for the first time, the media content scoring service is called again in the background periodically to score the media content with the failure scoring processing, each media content uploaded by the account is guaranteed to have a corresponding scoring result, and the high availability of the server for scoring the media content is improved.
In an exemplary embodiment, after the step of invoking the media content scoring service to score the media content, the method further comprises: and if the media content scoring result returned by the media content scoring service for the media content is obtained in the first waiting time, returning the media content scoring result to the account.
In a specific implementation, taking media content as a K song work as an example, when a user finishes recording the K song work through a K song application program installed in the user terminal, the user terminal uploads the K song work to a server through a preset work uploading interface, and then the server receives the K song work.
And then, the server calls the K song work scoring service to process the K song work, so as to attempt to acquire the work score for the K song work returned by the K song work scoring service. When the server acquires the grading result returned by the media content grading service for the media content in the preset first waiting time, the grading result corresponding to the media content is returned to the user terminal, so that the user can inquire the grading corresponding to the recorded K song works.
According to the technical scheme, media content uploaded by a user terminal is received; calling a media content scoring service to score the media content; when the scoring result returned by the media content scoring service for the media content is obtained within the preset first waiting time, the scoring result corresponding to the media content is returned to the user terminal, so that the user can know the scoring result corresponding to the uploaded media content in time.
In an exemplary embodiment, after the step of calling the media content scoring service to score the media content, the method further includes: if the media content scoring result returned by the media content scoring service for the media content cannot be obtained in the first waiting time, determining that the media content scoring service cannot score the media content in the preset first waiting time.
If the scoring processing abnormal message returned by the media content scoring service for the media content is obtained in the first waiting time, determining that the media content scoring service fails to score the media content in the preset first waiting time.
In a specific implementation, in a process of judging whether a media content scoring service can score media content within a preset first waiting time, the server can judge whether a media content scoring result returned by the media content scoring service for the media content can be obtained within the first waiting time; if the server fails to acquire the media content scoring result returned by the media content scoring service for the media content in the first waiting time, the server determines that the media content scoring service fails to score the media content in the preset first waiting time.
In addition, the server can also judge whether the server acquires the scoring processing abnormal message returned by the media content scoring service for the media content in the first waiting time; if the server acquires the scoring processing abnormal message returned by the media content scoring service for the media content in the first waiting time, the server determines that the media content scoring service fails to score the media content in the preset first waiting time.
According to the technical scheme, the server judges whether the server can acquire the media content scoring result returned by the media content scoring service for the media content in the first waiting time or not, and judges whether the server acquires the scoring processing abnormal information returned by the media content scoring service for the media content in the first waiting time or not, so that whether the media content scoring service can score the media content in the preset first waiting time or not is accurately judged.
In an exemplary embodiment, recalling the media content scoring service to score the target media content includes: if the media content scoring service fails to score the target media content within the preset second waiting time, adding an operation to the scoring failure times of the target media content; if the scoring failure times after the operation is added are greater than or equal to a preset times threshold, generating scoring abnormal alarm.
The scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
Wherein the second latency is greater than the first latency.
In a specific implementation, taking media content as a K song work as an example, in the process of re-calling the K song work scoring service to score a target K song work, the server can judge whether the K song work scoring service can score the target K song work within a preset second waiting time. If the server determines that the K song work scoring service cannot score the target K song work within the preset second waiting time, adding one operation to the scoring failure times of the target K song work.
If the server determines that the scoring failure times of the target K song works after the adding operation are greater than or equal to the preset times threshold, the server generates scoring abnormal alarm. The scoring anomaly alarm is used for indicating that the K song works need to be manually confirmed for data correctness and manually marked.
According to the technical scheme, in the process of re-calling the media content scoring service to score the target media content, if the media content scoring service cannot score the target media content within the preset second waiting time, the server performs an operation of adding one to the scoring failure times of the target media content; if the scoring failure times after the operation is added are greater than or equal to a preset times threshold, generating scoring abnormal alarm; therefore, the method and the system realize the recall of the media content scoring service processing for the media content with the last scoring processing failure in the background, ensure that each media content uploaded by a user has a corresponding scoring result, and enable the media content with data abnormality to be manually processed.
In an exemplary embodiment, recalling the media content scoring service to score the target media content includes: and if the media content scoring result returned by the media content scoring service for the target media content is obtained in the second waiting time, returning the media content scoring result to the account. And meanwhile, modifying the processing state identification of the target media content from the scoring failure identification to the scoring success identification.
In specific implementation, taking media content as a K song work as an example, when a server obtains a K song work scoring result returned by a K song work scoring service for a target K song work in a preset second waiting time, returning the K song work scoring result corresponding to the target K song work to a user terminal, further allowing a user to query the score corresponding to the recorded target K song work, and modifying a processing state identifier of the target media content from a scoring failure identifier to a scoring success identifier.
According to the technical scheme, the media content scoring result returned by the media content scoring service for the target media content is obtained in the second waiting time, and then the media content scoring result is returned to the account in time, so that a user can know the scoring result corresponding to the uploaded media content in time.
In an exemplary embodiment, recalling the media content scoring service to score the target media content includes: if the media content scoring result returned by the media content scoring service for the target media content cannot be obtained within the second waiting time, determining that the media content scoring service cannot score the target media content within the preset second waiting time.
If the scoring processing abnormal message returned by the media content scoring service for the target media content is acquired in the second waiting time, determining that the media content scoring service fails to score the target media content in the preset second waiting time.
In the specific implementation, in the process of recalling the media content scoring service to score the target media content, when the server judges whether the media content scoring service can score the media content within a preset second waiting time, the server can judge whether a media content scoring result returned by the media content scoring service for the target media content can be obtained within the second waiting time; if the server fails to acquire the media content scoring result returned by the media content scoring service for the target media content within the second waiting time, the server determines that the media content scoring service fails to score the target media content within the preset second waiting time.
In addition, the server can also judge whether the server acquires the scoring processing abnormal information returned by the media content scoring service for the target media content in the second waiting time; if the server acquires the scoring processing abnormal message returned by the media content scoring service for the target media content in the second waiting time, the server determines that the media content scoring service fails to score the target media content in the preset second waiting time.
According to the technical scheme of the embodiment, the server judges whether the server acquires the scoring abnormal message returned by the media content scoring service for the target media content in the second waiting time or not by judging whether the media content scoring service can score the media content in the preset second waiting time, so that whether the media content scoring service can score the media content in the preset second waiting time or not is accurately judged.
Fig. 3 is a flowchart illustrating another service invocation method, as shown in fig. 3, for use in the server 110 of fig. 1, according to an exemplary embodiment, including the following steps. In step S310, when media content uploaded by an account is received, a media content scoring service is invoked to score the media content. In step S320, when the media content scoring service fails to score the media content within a preset first waiting time, recording the number of scoring failures corresponding to the media content, and recording the processing status identifier of the media content as a scoring failure identifier; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content. In step S330, determining a target media content from the media content processed by the media content scoring service according to a preset time interval; the processing state identification of the target media content is a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold. In step S340, if the media content scoring service fails to score the target media content within the preset second waiting time, adding an operation to the scoring failure number of the target media content; wherein the second latency is greater than the first latency. In step S350, if the number of times of scoring failure after adding an operation is greater than or equal to the preset number of times threshold, a scoring anomaly alarm is generated; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies. It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of a service calling method, which is not described herein.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as 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 a portion of the steps in fig. 2 and 3 may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the execution of the steps or stages is not necessarily sequential, but may be performed in rotation or alternatively with at least a portion of the steps or stages in other steps or steps.
To facilitate understanding by those skilled in the art, FIG. 4 provides a process flow diagram of a service invocation method. When a user finishes recording a K song work through a K song application program installed in the user terminal, the user terminal uploads the K song work to the server through a preset work uploading interface, and then the server receives the K song work. Then, the server saves some basic information of the K song work into the above-mentioned data table (karaoke score_history), for example, information such as the music id, work id of the K song work, setting the number of scoring failures of the K song work to an initial value of 0, initializing the scoring state of the K song work, i.e. the processing state identification, and the like are recorded in the data table.
And then, the server calls the K song work scoring service to process the K song work, so as to attempt to acquire the work score for the K song work returned by the K song work scoring service. When the server fails to acquire the work grading of the K song works returned by the K song work grading service within the preset first waiting time or receives an abnormal notification returned by the K song work grading service, the server judges that the K song work grading service fails to finish grading treatment on the K song works, and at the moment, the server pauses calling the K song work grading service to grade the K song works, and records a corresponding treatment state identifier of the K song works as a grading failure identifier in a data table; meanwhile, the server can return error codes to the user terminal, so that the user is prompted to review the work scores of the K song works later. The data table records the corresponding processing state identification and scoring failure times of the K song works processed by the K song work scoring service. The server can determine the target K song works from the K song works processed by the K song work scoring service based on the corresponding processing state identification and scoring failure times of each K song work. The processing state identification of the target K song works is a scoring failure identification, and the scoring failure times of the target K song works are smaller than a preset time threshold. When the server acquires the K song work scoring result returned by the K song work scoring service aiming at the target K song work in the preset second waiting time, returning the K song work scoring result corresponding to the target K song work to the user terminal, further allowing the user to inquire the score corresponding to the recorded target K song work, and modifying the processing state identification of the target media content from the scoring failure identification to the scoring success identification.
Of course, when the server queries the K song works whose processing status is identified as failed, and the scoring failure times are greater than the preset threshold, the server can perform alarm operation, which indicates that the K song works need to manually confirm the correctness of the data and manually mark the data.
Fig. 5 is a block diagram of a service invocation apparatus, according to an exemplary embodiment. Referring to fig. 5, the apparatus includes:
An initial calling unit 510 configured to perform, when receiving media content uploaded by an account, calling a media content scoring service to score the media content;
A recording unit 520 configured to record the number of scoring failures corresponding to the media content when the media content scoring service fails to score the media content within a preset first waiting time, and record a processing status identifier of the media content as a scoring failure identifier; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content;
A determining unit 530 configured to perform determination of a target media content among the media contents processed through the media content scoring service at a preset time interval; the processing state identification of the target media content is set as a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold;
And a recall unit 540 configured to perform recall of the media content scoring service to score the target media content.
In one possible implementation, the apparatus further includes: and the result returning unit is configured to execute returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the media content is acquired within the first waiting time.
In one possible implementation, the apparatus further includes: the first judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the media content scoring result returned by the media content scoring service for the media content cannot be acquired in the first waiting time.
In one possible implementation, the apparatus further includes: and the second judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the scoring processing abnormal message returned by the media content scoring service for the media content is acquired within the first waiting time.
In one possible implementation manner, the recall unit 540 is specifically configured to perform an operation of adding a score failure number of the target media content if the media content scoring service fails to score the target media content within a preset second waiting time; wherein the second latency is greater than the first latency; if the scoring failure frequency after the operation is added is greater than or equal to the preset frequency threshold, generating scoring abnormal alarm; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
In a possible implementation manner, the recall unit 540 is specifically configured to perform returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the target media content is obtained within the second waiting time.
In one possible implementation manner, the recall unit 540 is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a media content scoring result returned by the media content scoring service for the target media content cannot be obtained within the second waiting time.
In one possible implementation manner, the recall unit 540 is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a scoring abnormal message returned by the media content scoring service for the target media content is obtained within the second waiting time.
Fig. 6 is a block diagram illustrating an apparatus 600 for performing a service invocation method, according to an example embodiment. For example, device 600 may be a server. Referring to fig. 6, device 600 includes a processing component 620 that further includes one or more processors and memory resources represented by memory 622 for storing instructions, such as applications, executable by processing component 620. The application program stored in memory 622 may include one or more modules each corresponding to a set of instructions. Further, the processing component 620 is configured to execute instructions to perform the service invocation methods described above.
The device 600 may also include a power component 624 configured to perform power management of the device 600, a wired or wireless network interface 626 configured to connect the device 600 to a network, and an input/output (I/O) interface 628. The device 600 may operate based on an operating system stored in memory 622, such as a WindowS Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of electronic device 700 to perform the above-described method. Alternatively, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program stored in a computer readable storage medium, the computer program being executable by the processor 720 of the electronic device 700 to perform the above-described method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (19)

1. A service invocation method, the method comprising:
When receiving media content uploaded by an account, calling a media content scoring service to score the media content;
When the media content scoring service fails to score the media content within a preset first waiting time, recording the scoring failure times corresponding to the media content, and recording the processing state identification of the media content as a scoring failure identification; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content; the processing state identification obtained by scoring the media content is stored in a data table, and the data table also comprises ID information of the media content;
Determining target media content in the media content processed by the media content scoring service according to a preset time interval; the processing state identifier of the target media content is a scoring failure identifier, and the scoring failure frequency of the target media content is smaller than a preset frequency threshold;
And re-calling the media content scoring service to score the target media content.
2. The service invocation method of claim 1, wherein after the step of invoking the media content scoring service to score the media content, the method further comprises:
and if the media content scoring result returned by the media content scoring service for the media content is obtained in the first waiting time, returning the media content scoring result to the account.
3. The service invocation method of claim 1, wherein after the step of invoking the media content scoring service to score the media content, the method further comprises:
If the media content scoring result returned by the media content scoring service for the media content cannot be obtained in the first waiting time, determining that the media content scoring service cannot score the media content in the preset first waiting time.
4. The service invocation method of claim 1, wherein after the step of invoking the media content scoring service to score the media content, the method further comprises:
And if the scoring processing abnormal message returned by the media content scoring service for the media content is acquired in the first waiting time, determining that the media content scoring service fails to score the media content in the preset first waiting time.
5. The service invocation method of claim 1, wherein the recalling the media content scoring service scores the target media content, comprising:
If the media content scoring service fails to score the target media content within the preset second waiting time, adding an operation to the scoring failure times of the target media content; wherein the second latency is greater than the first latency;
If the scoring failure frequency after the operation is added is greater than or equal to the preset frequency threshold, generating scoring abnormal alarm; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
6. The service invocation method of claim 5, wherein the recalling the media content scoring service scores the target media content, comprising:
and if the media content scoring result returned by the media content scoring service for the target media content is obtained in the second waiting time, returning the media content scoring result to the account.
7. The service invocation method of claim 5, wherein the recalling the media content scoring service scores the target media content, comprising:
if the media content scoring result returned by the media content scoring service for the target media content cannot be obtained in the second waiting time, determining that the media content scoring service cannot score the target media content in the preset second waiting time.
8. The service invocation method of claim 5, wherein the recalling the media content scoring service scores the target media content, comprising:
and if the scoring processing abnormal message returned by the media content scoring service for the target media content is acquired in the second waiting time, determining that the media content scoring service fails to score the target media content in the preset second waiting time.
9. A service invocation apparatus, comprising:
An initial calling unit configured to execute a scoring process for calling a media content scoring service to score the media content when receiving the media content uploaded by the account;
A recording unit configured to record the number of scoring failures corresponding to the media content when the media content scoring service fails to score the media content within a preset first waiting time, and record a processing state identifier of the media content as a scoring failure identifier; the scoring failure times are accumulated times that the scoring service of the media content fails to complete scoring processing of the media content; the processing state identification obtained by scoring the media content is stored in a data table, and the data table also comprises ID information of the media content;
A determining unit configured to perform determining a target media content among the media contents processed by the media content scoring service at a preset time interval; the processing state identification of the target media content is set as a scoring failure identification, and the scoring failure times of the target media content are smaller than a preset time threshold;
And the recall unit is configured to execute recall of the media content scoring service to score the target media content.
10. The service invocation apparatus of claim 9, wherein the apparatus further comprises: and the result returning unit is configured to execute returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the media content is acquired within the first waiting time.
11. The service invocation apparatus of claim 9, wherein the apparatus further comprises: the first judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the media content scoring result returned by the media content scoring service for the media content cannot be acquired in the first waiting time.
12. The service invocation apparatus of claim 9, wherein the apparatus further comprises: and the second judging unit is configured to execute the step of determining that the media content scoring service fails to score the media content within the preset first waiting time if the scoring processing abnormal message returned by the media content scoring service for the media content is acquired within the first waiting time.
13. The service invocation apparatus of claim 9, wherein the recall unit is specifically configured to perform an operation of adding one to the number of scoring failures of the target media content if the media content scoring service fails to score the target media content within a preset second waiting time; wherein the second latency is greater than the first latency; if the scoring failure frequency after the operation is added is greater than or equal to the preset frequency threshold, generating scoring abnormal alarm; the scoring anomaly alarm is used for reminding a user that the target media content has data anomalies.
14. The service invocation apparatus of claim 13, wherein the recall unit is specifically configured to perform returning the media content scoring result to the account if the media content scoring result returned by the media content scoring service for the target media content is obtained within the second wait time.
15. The service invocation apparatus of claim 13, wherein the recall unit is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a media content scoring result returned by the media content scoring service for the target media content is not obtained within the second waiting time.
16. The service invocation apparatus of claim 13, wherein the recall unit is specifically configured to perform determining that the media content scoring service fails to score the target media content within a preset second waiting time if a scoring exception message returned by the media content scoring service for the target media content is obtained within the second waiting time.
17. A server, comprising:
A processor;
A memory for storing the processor-executable instructions;
Wherein the processor is configured to execute the instructions to implement the service invocation method of any of claims 1 to 8.
18. A computer readable storage medium, which when executed by a processor of a server, causes the server to perform the service invocation method of any of claims 1 to 8.
19. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the service invocation method of any of claims 1 to 8.
CN202011585190.XA 2020-12-28 2020-12-28 Service calling method, device, server and storage medium Active CN113051085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011585190.XA CN113051085B (en) 2020-12-28 2020-12-28 Service calling method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011585190.XA CN113051085B (en) 2020-12-28 2020-12-28 Service calling method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN113051085A CN113051085A (en) 2021-06-29
CN113051085B true CN113051085B (en) 2024-04-30

Family

ID=76508465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011585190.XA Active CN113051085B (en) 2020-12-28 2020-12-28 Service calling method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113051085B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786619A (en) * 2016-08-31 2018-03-09 中兴通讯股份有限公司 Media server dispatching method, apparatus and system
CN108664484A (en) * 2017-03-28 2018-10-16 腾讯科技(北京)有限公司 Media content recommendations method and device
CN108833985A (en) * 2018-07-09 2018-11-16 深圳市茁壮网络股份有限公司 A kind of multimedia programming methods of marking, ranking list generation method and device
CN109104336A (en) * 2018-09-27 2018-12-28 平安普惠企业管理有限公司 Service request processing method, device, computer equipment and storage medium
CN110233881A (en) * 2019-05-22 2019-09-13 平安科技(深圳)有限公司 Service request processing method, device, equipment and storage medium
CN110598010A (en) * 2018-07-24 2019-12-20 腾讯科技(深圳)有限公司 Grading processing method, system and storage medium of media content

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120131013A1 (en) * 2010-11-19 2012-05-24 Cbs Interactive Inc. Techniques for ranking content based on social media metrics

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786619A (en) * 2016-08-31 2018-03-09 中兴通讯股份有限公司 Media server dispatching method, apparatus and system
CN108664484A (en) * 2017-03-28 2018-10-16 腾讯科技(北京)有限公司 Media content recommendations method and device
CN108833985A (en) * 2018-07-09 2018-11-16 深圳市茁壮网络股份有限公司 A kind of multimedia programming methods of marking, ranking list generation method and device
CN110598010A (en) * 2018-07-24 2019-12-20 腾讯科技(深圳)有限公司 Grading processing method, system and storage medium of media content
CN109104336A (en) * 2018-09-27 2018-12-28 平安普惠企业管理有限公司 Service request processing method, device, computer equipment and storage medium
CN110233881A (en) * 2019-05-22 2019-09-13 平安科技(深圳)有限公司 Service request processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113051085A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN110022260B (en) Cross-environment receipt message processing method and system
CN107040576B (en) Information pushing method and device and communication system
CN109672608B (en) Method for transmitting messages according to time
CN110933136A (en) Service node selection method, device, equipment and readable storage medium
CN111309693A (en) Data synchronization method, device and system, electronic equipment and storage medium
CN112433885B (en) Block chain consensus processing method and device, electronic equipment and storage medium
CN112838980A (en) Message processing method, system, device, electronic equipment and storage medium
CN111431952B (en) Message pushing method, device and system, computer storage medium and electronic equipment
CN113051085B (en) Service calling method, device, server and storage medium
CN113409109B (en) Order creation method, device, server and storage medium
CN114185659A (en) A task recovery method, device, electronic device and storage medium
CN108390770B (en) Information generation method and device and server
CN112988776A (en) Method, device and equipment for updating text parsing rule and readable storage medium
CN109726223B (en) Data stream association method and device
CN109298928B (en) Service processing method and device
CN115801559B (en) Abnormal response method, device and system
WO2021168654A1 (en) Method and apparatus for detecting synchronized data, server, and data synchronization system
CN115098525B (en) Index updating method and device, electronic equipment and storage medium
CN114422576B (en) Session cleaning method and device, computer equipment and readable storage medium
CN112948020B (en) Configuration file processing method and device
CN111949428B (en) Method, device, equipment and storage medium for improving service availability of small program
CN114500631B (en) Web page heartbeat connection maintenance method and related equipment
CN111198853A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN115827280A (en) Message processing method and device, electronic equipment and storage medium
CN112988469A (en) State backup method and device in alliance chain 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