Document processing service resource scheduling method and device, electronic equipment and storage medium
By determining the target execution time in the document processing service and dynamically allocating service resources, the problem of untimely generation of annotation information in the prior art is solved, and real-timeness and user experience are improved.
Patent Information
- Application Number
- CN202411537918.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
AI Technical Summary
When generating annotation information, existing document processing services consume too much resources, resulting in low real-time performance and untimely generation of annotation information, which affects the user experience.
By receiving a processing request for the target document, the execution information of the processing request is determined, including the target execution time, and at that time the corresponding service resource is called to generate comment information, to realize dynamic service resource allocation.
Optimize the allocation of service resources, improve the real-time nature of annotation information generation, and improve the user experience.
Smart Images

Figure CN119520614A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of cloud service technology, and in particular to a document processing service resource scheduling method, device, electronic device and storage medium. Background Art
[0002] Currently, document applications are widely used in all walks of life. Based on traditional offline documents, online documents and corresponding functions have been further developed, realizing functions such as multi-person simultaneous editing and cloud storage of document content, which greatly improves the efficiency of document editing.
[0003] For the application scenario of online document editing, the relevant technology can deploy document processing services to detect document content and generate annotation information for locating and explaining abnormal words in the document that are difficult to understand, effectively improving the efficiency and quality of document editing.
[0004] However, the document processing service for generating annotation information consumes a large amount of service resources. Due to the limited total amount of service resources, the document processing service has low real-time performance and the annotation information is not generated in a timely manner. Summary of the invention
[0005] The embodiments of the present disclosure provide a document processing service resource scheduling method, device, electronic device and storage medium to overcome the problem of untimely generation of annotation information in the process of generating annotation information.
[0006] In a first aspect, an embodiment of the present disclosure provides a document processing service resource scheduling method, including:
[0007] Receive a processing request for a target document, the processing request is used to generate annotation information for the target document, the annotation information is at least used to indicate the location of abnormal words in the target document, the abnormal words are difficult to understand words that have not been explained in the target document; in response to the processing request, determine execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request; based on the execution information of the processing request, call a corresponding service resource at the target execution time to generate annotation information for the target document.
[0008] In a second aspect, an embodiment of the present disclosure provides a document processing service resource scheduling device, including:
[0009] A receiving module, configured to receive a processing request for a target document, wherein the processing request is used to generate annotation information of the target document, wherein the annotation information is used to at least indicate a position of an abnormal word in the target document, wherein the abnormal word is an incomprehensible word that has not been explained in the target document;
[0010] a response module, configured to determine, in response to the processing request, execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request;
[0011] The processing module is used to call the corresponding service resource at the target execution time to generate the annotation information of the target document according to the execution information of the processing request.
[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0013] The memory stores computer-executable instructions;
[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the document processing service resource scheduling method as described in the first aspect and various possible designs of the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the document processing service resource scheduling method described in the first aspect and various possible designs of the first aspect is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the document processing service resource scheduling method as described in the first aspect and various possible designs of the first aspect.
[0017] The document processing service resource scheduling method, device, electronic device and storage medium provided in this embodiment receive a processing request for a target document, the processing request is used to generate annotation information of the target document, the annotation information is at least used to indicate the location of abnormal words in the target document, and the abnormal words are difficult to understand words that are not explained in the target document; in response to the processing request, determine the execution information of the processing request, wherein the execution information is at least used to characterize the target execution time of the processing request; according to the execution information of the processing request, call the corresponding service resource at the target execution time to generate annotation information of the target document. After receiving the processing request for generating annotation information, the execution information representing the execution time corresponding to the processing request is generated, and then based on the execution information matching the document status of the target document, the annotation information of the target document is generated at the target execution time, thereby realizing dynamic service resource allocation based on the document status, optimizing service resource allocation, improving the real-time performance of annotation information generation, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 An application scenario diagram of the document processing service resource scheduling method provided in the embodiment of the present disclosure;
[0020] Figure 2 Schematic diagram of the process of document processing service resource scheduling method provided by the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 for Figure 2 A flowchart of a specific implementation method of step S102 in the illustrated embodiment;
[0022] Figure 4 Schematic diagram of the process of document processing service resource scheduling method provided by the embodiment of the present disclosure Figure 2 ;
[0023] Figure 5 for Figure 4 A flowchart of a specific implementation method of step S204 in the illustrated embodiment;
[0024] Figure 6 for Figure 4 A flowchart of a specific implementation method of step S205 in the illustrated embodiment;
[0025] Figure 7 A schematic diagram of a process for scheduling traffic resources of a task queue provided in an embodiment of the present disclosure;
[0026] Figure 8 A structural block diagram of a document processing service resource scheduling device provided in an embodiment of the present disclosure;
[0027] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0028] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] The application scenarios of the embodiments of the present disclosure are explained below:
[0032] Figure 1A diagram of an application scenario of the document processing service resource scheduling method provided in the embodiment of the present disclosure. The document processing service resource scheduling method provided in the embodiment of the present disclosure can be applied to an application (APP, Application) client with a document editing function and a corresponding server, and more specifically can be applied to an application scenario in which annotation information is automatically generated for a document. The execution subject of this embodiment can be a server where the server corresponding to the above-mentioned application with a document editing function is located, or it can be, for example, a control server independently set up in a distributed system, such as a load balancing server, or other electronic devices that perform similar functions. Among them, in some embodiments, the above-mentioned server can implement the document processing service resource scheduling method provided in the embodiment of the present disclosure by running various computer executable instructions or computer programs. For example, the computer executable instructions can be program-level commands, machine instructions or software instructions. The computer program can be a native program or software module in the operating system; it can be a local application, that is, a program that needs to be installed in the operating system to run, or it can be a small program embedded in any APP, that is, a program that runs based on a browser environment. In summary, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form, and the specific implementation form can be configured as needed. Furthermore, in the process of implementing the document processing service resource scheduling method provided by the embodiment of the present disclosure, the above-mentioned server can execute the method by running a computer executable instruction or computer program set locally, or by calling a computer executable instruction or computer program set in an external server. In some embodiments, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud communications, cloud databases, cloud computing, cloud functions, network services, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, among which cloud services can be interactive processing services for terminal devices to call.
[0033] refer to Figure 1As shown in , in a possible scenario, the terminal device displays the online document by running the above application with document editing function and edits the online document by responding to user operations. In this process, the server detects the online document being edited in real time by running the document processing service, identifies the abnormal content therein, and returns the identification result to the application in the terminal device in the form of annotation information for display. For example, as shown in the figure, the normal content in the document is represented by "X". The content of the above document contains abnormal content "AAA". After being processed by the document processing service and generating annotation information, the terminal device side marks it with an underline based on the annotation information to remind the user to confirm or modify the above abnormal content. On the other hand, the server will automatically execute the above processing process on the existing cloud document DOC_2 stored in the cloud through the document processing service, and add corresponding annotation information to the cloud document according to the execution result. Thereby optimizing the existing documents that have been generated before.
[0034] In the related technology, the document processing service of annotation information consumes a large amount of service resources. Since the related technology does not distinguish between document states, the document processing tasks that need to generate annotation information in the above two situations are processed on demand based on all service resources. However, the total amount of service resources is limited, which leads to queuing of the above document processing tasks, and further reduces the real-time performance of the annotation information generated for the document. In particular, when users are editing documents in real time, there is a problem that the annotation information cannot be generated in time for the newly edited document content, affecting the user experience.
[0035] The embodiment of the present disclosure provides a document processing service resource scheduling method to solve the above-mentioned problem.
[0036] refer to Figure 2 , Figure 2 Schematic diagram of the process of document processing service resource scheduling method provided by the embodiment of the present disclosure Figure 1 The method of this embodiment can be applied in a server. The document processing service resource scheduling method includes:
[0037] Step S101: receiving a processing request for a target document, the processing request is used to generate annotation information of the target document, the annotation information is used to at least indicate the location of abnormal words in the target document, the abnormal words are difficult to understand words that are not explained in the target document.
[0038] Step S102: In response to the processing request, determining execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request, and the target execution time matches a document state of a target document.
[0039] For example, reference Figure 1In the application scenario diagram shown, the document processing service resource scheduling method provided in this embodiment is introduced with the server as the execution subject. For example, a server corresponding to an application with a document editing function is deployed in the server, which is used to respond to a processing request sent by an application client in a terminal device, or a processing request generated by a preset program logic, to process the target document and generate corresponding annotation information. The annotation information is at least used to indicate the location of abnormal words in the target document, and the abnormal words are difficult to understand words that are not explained in the target document. First, the principle of generating annotation information is briefly introduced below. For example, the server reads the target file and segments the target document to obtain an ordered word source set composed of multiple word sources. Then, the ordered word source set is processed using a pre-trained large model or a combined model composed of multiple models. The specific processing process of the above model includes, for example: determining the difficult-to-understand words in the target document through processes such as blacklist identification and semantic identification, and then searching the target document (ordered word source set) to find the relevant explanation information of the difficult-to-understand words, and removing the difficult-to-understand words (i.e., the difficult-to-understand words containing relevant explanation information in the target document) to obtain abnormal words, and then generating annotation information based on the position of the abnormal word. Furthermore, the annotation information can also include supplementary explanations for the abnormal word, which can be generated by querying external information such as entry data and Internet information, combined with the context of the target text, using a text generation model. The above-mentioned process of generating annotation information is only exemplary, and this embodiment does not limit the specific generation method and steps of annotation information.
[0040] Furthermore, after receiving the processing request, the server responds to it. Exemplarily, the server determines the target document corresponding to the processing request by parsing the information in the processing request. Specifically, for example, the unique identifier corresponding to the target document is obtained. The target document is a cloud document. The cloud document is located by the unique identifier, and the document status of the target document can be obtained. Among them, the document status represents whether the target document is currently in an open state or a closed state. Among them, the open state is the state in which the cloud document is being viewed or edited by the user, and the closed state is the state that was previously generated and is not currently opened by the user. Under different document states, the server generates a target execution time of the processing request that matches it, that is, the execution information. Thereby, differentiated execution times based on document states are achieved.
[0041] In a possible implementation, the execution information includes time information representing the target execution time, such as Figure 3 As shown, the specific implementation of step S102 includes:
[0042] Step S1021: acquiring a document status of a target document according to the processing request, wherein the document status is a first document status or a second document status, the first document status indicating that the target document is in an open state, and the second document status indicating that the target document is in a closed state;
[0043] Step S1022: when the document state is the first document state, the time information indicates the first execution time;
[0044] Step S1023: When the document state is the second document state, the time information indicates the second execution time, and the first execution time is earlier than the second execution time.
[0045] Exemplarily, after receiving a processing request, the server locates the target document according to the processing request, and then obtains the document status of the target document. When the document status is the first document status, i.e., the open status, the execution time corresponding to the processing request is determined to be the first execution time, and time information t1 is generated based on the first execution time, and then the execution information Info_1 is obtained; and when the document status is the second document status, i.e., the closed status, the execution time corresponding to the processing request is determined to be the second execution time later than the above-mentioned first execution time, and time information t2 is generated based on the first execution time, and then the execution information Info_2 is obtained.
[0046] In the steps of this embodiment, when the target document is in an open state, the corresponding processing request is executed at an earlier first execution time to generate the corresponding annotation information, and when the target document is in a closed state, the corresponding processing request is executed at a later second execution time to generate the corresponding annotation information. This ensures that the target document in the open state (i.e., the real-time editing document) can be processed and the corresponding annotation information can be generated faster than the target document in the closed state (the stock document). In the case of a shortage of total service resources, the target document in the open state can be generated first, and the generation speed of its corresponding annotation information can be increased, thereby achieving the purpose of timely reminding the user and improving the user experience.
[0047] Further, in a possible implementation, the first execution time is the current time; the second execution time is a low load time, and the low load time is determined based on a low load period of the service resource;
[0048] Before step S102, the method further includes:
[0049] Step S100A: Acquire the operation history data of the service resources.
[0050] Step S100B: Determine a low-load period of the service resource based on the operation history data.
[0051] Exemplarily, for example, after the server receives a processing request, if the document status determined based on the processing request is the first document status, the corresponding generation task is immediately executed based on the execution information to generate annotation information for the target document, that is, the target execution time is the current time. If the document status determined based on the processing request is the second document status, the corresponding generation task is executed within the low-load period determined by the operation history data of the service resource, such as 0:00 to 6:00 in the morning, to generate annotation information for the target document. That is, the target execution time is a low-load moment in the low-load period, more specifically, the low-load moment is, for example, the starting time point of the low-load period, or according to the task plan of the service resource in the low-load period, a moment corresponding to the lowest load point is determined, and so on.
[0052] Furthermore, in a possible implementation manner, the execution information also includes resource information representing the service resources. Accordingly, in this embodiment, it also includes:
[0053] Step S102A: When the document state is the first document state, the resource information indicates the first service resource, and when the document state is the second document state, the resource information indicates the second service resource, and the resource amount of the first service resource is greater than the resource amount of the second service resource.
[0054] Exemplarily, in this embodiment, the execution information also includes resource information representing service resources. The service resources in the execution information also match the file status. That is, when the document status of the target document is open (first document status), a first service resource with a larger amount of resources is matched to it, thereby satisfying the resource demand for real-time generation of annotation information when the target document is edited; and when the document status of the target document is closed (second document status), a second service resource with a smaller amount of resources is matched to it, thereby improving the service resource utilization efficiency of the file processing service.
[0055] Among them, the above steps S102 and S102A can be executed simultaneously, that is, through the document state of the target document, the time information and resource information matching it are determined, and the time information and resource information are used as execution information to execute the subsequent steps. For example, when the target document is in an open state (a first document state), the corresponding time information is determined to be the current time and the resource information is 3 (preset resource unit); when the target document is in a closed state (a second document state), the corresponding time information is determined to be 0:00 to 6:00 in the morning and the resource information is 1 (preset resource unit).
[0056] Step S103: According to the execution information of the processing request, the corresponding service resource is called at the target execution time to generate annotation information of the target document.
[0057] Exemplarily, after obtaining the execution information, the corresponding annotation information generation task is executed according to the target execution time indicated by the execution information, and, optionally, the target service resources, to generate annotation information for the target document. Through the steps of this embodiment, it is possible to implement scheduling and optimization of service resources from two dimensions, namely, time and resources, thereby achieving differentiated service resource supply for different document states, improving the overall resource utilization efficiency of document processing services, and ensuring the real-time generation of annotation information.
[0058] In this embodiment, by receiving a processing request for a target document, the processing request is used to generate annotation information of the target document, and the annotation information is at least used to indicate the location of abnormal words in the target document, and the abnormal words are difficult to understand words that have not been explained in the target document; in response to the processing request, the execution information of the processing request is determined, wherein the execution information is at least used to characterize the target execution time of the processing request; according to the execution information of the processing request, the corresponding service resource is called at the target execution time to generate annotation information of the target document. After receiving the processing request for generating annotation information, the execution information representing the execution time corresponding to the processing request is generated, and then based on the execution information matching the document state of the target document, the annotation information of the target document is generated at the target execution time, thereby realizing dynamic service resource allocation based on the document state, optimizing service resource allocation, improving the real-time performance of annotation information generation, and improving user experience.
[0059] refer to Figure 4 , Figure 4 Schematic diagram of the process of document processing service resource scheduling method provided by the embodiment of the present disclosure Figure 2 In this embodiment Figure 2 Based on the embodiment shown, step S103 is further refined, and the document processing service resource scheduling method includes:
[0060] Step S201: receiving a processing request for a target document, the processing request is used to generate annotation information of the target document, the annotation information is used to at least indicate the location of abnormal words in the target document, the abnormal words are difficult to understand words that have not been explained in the target document.
[0061] Step S202: In response to the processing request, determining execution information of the processing request, the execution information including time information representing the target execution moment, and resource information representing the service resources.
[0062] Step S203: Determine the target priority according to the execution information.
[0063] Exemplarily, the service resource includes at least two task queues with different priorities. For example, the service resource is composed of multiple task queues such as task queue #1, task queue #2, and task queue #3, wherein each task queue corresponds to a different priority, and task queues of different priorities can be configured with resource amounts that match the priority. For example, task queue #1 corresponds to a high priority and is used to process high-priority annotation information generation tasks, task queue #2 corresponds to a medium priority and is used to process medium-priority annotation information generation tasks, and so on. After obtaining the execution information, the corresponding target priority is determined according to the time information and resource information carried in the execution information. For example, if the time information in the execution information is the first execution time representing the current moment, the target priority is determined to be a high priority; for another example, if the time information in the execution information is the first execution time representing the current moment, and the resource information is the first service resource with a larger amount of resources, the target priority is determined to be a high priority; if the time information in the execution information is the first execution time representing the current moment, and the resource information is the second service resource with a smaller amount of resources, the target priority is determined to be a medium priority. Afterwards, the corresponding target task queue can be determined based on the target priority.
[0064] Furthermore, the document state of the target document includes a first document state and a second document state, and the second document state includes a first sub-state and a second sub-state. The first document state and the second document state have been introduced in the previous embodiment and will not be repeated here. The task queue includes a high priority task queue, a medium priority queue and a low priority queue, wherein the high priority task queue is used to generate annotation information for the target document in the first sub-state, and the first sub-state indicates that the target document is in an open state for real-time editing; the medium priority task queue is used to generate annotation information for the target document in the second sub-state, and the second sub-state indicates that the target document is in an open state that does not contain annotation information; the low priority task queue is used to generate annotation information for the target document in the second document state, and the second document state indicates that the target document is in a closed state.
[0065] Specifically, the target document includes a first document state and a second document state. The first document state indicates that the target document is in an open state, and the second document state indicates that the target document is in a closed state. On this basis, the first document state is further divided into a first sub-state and a second sub-state. The first sub-state indicates that the target document is opened and in a real-time editing state; the first sub-state indicates that the target document is opened and in an open state that does not contain annotation information; that is, the state of the target document when it is just opened. Further, in this embodiment, the corresponding execution information can be determined based on the above-mentioned multiple document states, and then the corresponding target priority and the target task queue corresponding to the target priority (one of the high priority task queue, the medium priority queue and the low priority queue) can be determined.
[0066] Optionally, all task queues corresponding to the service resources share a target amount of total traffic resources. Based on the above steps, this embodiment further includes:
[0067] Step S204: Detect whether there is a task backlog in each task queue and obtain a detection result.
[0068] Step S205: Based on the total traffic resources, according to the detection results corresponding to each task queue, the traffic resources of at least two task queues are scheduled to obtain an adjusted task queue.
[0069] Exemplarily, after determining the target priority, in a possible implementation, step S206 can be directly executed to dispatch the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority, and as the target task queue consumes the task items in the queue, the generation of annotation information for the target document is completed. In another possible implementation, before determining the target task queue, the resource allocation of each task queue can be further scheduled to optimize the work efficiency of each task queue. Specifically, for example, first detect whether there is a task backlog in each task queue, and obtain the detection result. The backlog task is the task queue that cannot be processed immediately and needs to wait in line for a period of time before processing. The backlog task means that the annotation information cannot be generated immediately. At the same time, as the number of backlog tasks increases, the waiting time for executing the corresponding annotation information generation task is longer, and the real-time performance of generating annotation information for the target document is worse. The backlog tasks of the task queue are affected by the flow resources of the task queue. The larger the flow resources allocated to the task queue, the stronger the ability of the task queue to process the annotation information generation task, and accordingly, the number of backlog tasks generated is less (until there is no backlog task).
[0070] Therefore, in this embodiment, by detecting whether each task queue has a task backlog, the detection result is obtained to determine whether the flow resources currently allocated to each task queue can meet its performance requirements, that is, whether there is a task backlog; if there is no backlog task in some task queues (the number of backlog tasks is 0), and there are a large number of backlog tasks in some task queues, it means that the flow resources are unreasonable. In this embodiment, illustratively, when the total flow resources are certain, the flow resources of the task queue with a backlog of 0 or less are dispatched to the task queue with a backlog of not 0 or more, thereby improving the comprehensive resource utilization of each task queue.
[0071] Furthermore, in a possible implementation, Figure 5 As shown, the specific implementation of step S204 includes:
[0072] Step S2041: Obtain the maximum queue length of each task queue;
[0073] Step S2042: Detect the current task offset in each task queue, and obtain the detection result according to the task offset and the maximum queue length.
[0074] Exemplarily, the maximum queue length of the task queue, that is, the maximum number of tasks that the task queue can queue for processing, and the current task offset in the task queue, that is, the position of the most recently called task in the task queue. If the difference between the maximum queue length and the task offset is less than a threshold, for example 1, then it is determined that there is a backlog of tasks in the task queue; otherwise, it is determined that there is no backlog of tasks in the task queue, and the detection result is one of the above two situations.
[0075] In a possible implementation, all task queues include at least a high-priority task queue; Figure 6 As shown, the specific implementation of step S205 includes:
[0076] Step S2051: When there is a backlog of tasks in each task queue, part or all of the traffic resources of the non-high priority task queue are dispatched to the high priority task queue to obtain an adjusted task queue.
[0077] Step S2052: when at least one task queue does not have backlogged tasks, partially or completely dispatch the traffic resources of the task queue without backlogged tasks to the task queue with backlogged tasks to obtain an adjusted task queue.
[0078] Exemplarily, based on the introduction in the above-mentioned embodiment steps, when at least one task queue does not have a task backlog, that is, at least one task queue currently has idle traffic resources, the idle traffic resources are dispatched to the queue that currently has a task backlog, thereby realizing the dispatch of idle traffic resources. When each task queue has a task backlog, the resource supply of the high-priority task queue is prioritized, that is, the traffic resources of the non-high-priority task queue are partially or fully dispatched to the high-priority task queue, reducing the backlog of tasks in the high-priority task queue, so that the annotation information generation task in the high-priority task queue can be quickly executed, and then the annotation information is generated in time when the target document is edited in real time.
[0079] In one possible implementation, the task queue includes a high-priority task queue, a medium-priority queue, and a low-priority queue. The specific meanings have been introduced in the previous embodiment and will not be repeated here. When scheduling traffic resources for task queues, when each task queue has a task backlog, for example, the traffic resources of the medium-priority queue and the low-priority queue can be scheduled to the high-priority queue; when at least one task queue does not have a backlog of tasks, the traffic resources of the task queue without a task backlog can be partially or fully scheduled to the task queue with a task backlog. For example, the traffic resources of the medium-priority queue without a task backlog can be scheduled to the low-priority queue with a task backlog, or the traffic resources of the high-priority queue without a task backlog can be scheduled to the low- and medium-priority queues with a task backlog. The specific settings are based on needs.
[0080] Step S206: Schedule the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority.
[0081] Step S207: Generate annotation information of the target document through the target task queue.
[0082] After the target priority determines the target task queue that matches it, the annotation information generation task corresponding to the processing request can be scheduled to the target task queue corresponding to the target priority for processing, thereby utilizing the traffic resources of the target task queue to complete the process of generating annotation information for the target document. Figure 2 This has been introduced in the illustrated embodiment and will not be described again in detail here.
[0083] Optionally, in this embodiment, the method further includes:
[0084] Step S200: According to the priority of each task queue, configure the resource ratio of the traffic resources of the corresponding task queue at different times, wherein the priority is proportional to the resource ratio.
[0085] Exemplarily, for the service resources composed of multiple task queues, before or while executing the above steps, the resource ratio of the flow resources of the corresponding task queue at different times can be configured according to the priority of each task queue, so that the priority is proportional to the resource ratio, so that the high-priority task queue can obtain more (initial) flow resources, thereby improving the speed of generating the annotation text of the target document in different states, and the overall resource utilization efficiency. At the same time, the above configuration process is related to time, that is, different configuration strategies are used for configuration at different times. For example, during busy hours (e.g. 8:00 to 18:00 during the day), the ratio of traffic resources of high-priority task queues to traffic resources of low-priority task queues is configured to be 10:1, so as to ensure the traffic resource supply of high-priority task queues as much as possible, thereby speeding up the generation of annotation information when users edit documents in real time; and during idle hours (e.g. 0:00 to 6:00 in the morning), the ratio of traffic resources of high-priority task queues to traffic resources of low-priority task queues is configured to be 2:1, while ensuring the traffic resource supply of high-priority task queues so that they can handle a small number of high-real-time tasks at night, while increasing the traffic resource supply of low-priority task queues, so that the existing original documents (documents that do not contain annotation information) can be converted into documents containing annotation information as soon as possible, thereby improving the utilization of service resources.
[0086] Figure 7 A schematic diagram of a process for scheduling traffic resources of a task queue provided in an embodiment of the present disclosure is shown below in conjunction with Figure 7 The above process is introduced, for example, Figure 7 As shown, task queue #1, task queue #2 and task queue #3 are deployed in the server. On the one hand, after receiving the processing request for the target document, the server will determine the target task queue that matches it according to the target priority of the processing request, and send the processing request to the target task queue for processing. On the other hand, the server configures the initial traffic resources of each task queue through the priority queue configuration, and limits the flow of each of the above task queues based on the initial traffic resources; at the same time, the server detects whether there is a task backlog in each task queue, and calculates and updates the traffic resources of each task queue according to the task backlog of each task queue, so as to realize dynamic flow limiting adjustment of the task queue. After that, each task queue pulls the corresponding processing request based on the configured traffic resources and the corresponding priority ratio, and asynchronously executes the corresponding annotation information generation task.
[0087] In this embodiment, the implementation method of step S201-step S202 is the same as that of the present disclosure. Figure 2 The implementation methods of step S101 and step S102 in the illustrated embodiment are the same and will not be described in detail here.
[0088] Corresponding to the document processing service resource scheduling method of the above embodiment, Figure 8 A structural block diagram of a document processing service resource scheduling device provided in an embodiment of the present disclosure. The method described in the above embodiment can be executed by the document processing service resource scheduling device, which can be implemented by software and / or hardware, and can be integrated in an electronic device with certain data processing functions. The electronic device can include but is not limited to a mobile terminal with big data processing capabilities, and a fixed terminal with big data processing capabilities such as a desktop computer and a supercomputer.
[0089] For the sake of convenience, only the parts related to the embodiments of the present disclosure are shown. Figure 8 , the document processing service resource scheduling device 3 includes:
[0090] A receiving module 31, configured to receive a processing request for a target document, the processing request being used to generate annotation information of the target document, the annotation information being used to indicate at least the location of an abnormal word in the target document, the abnormal word being an incomprehensible word that has not been explained in the target document;
[0091] A response module 32, configured to determine, in response to the processing request, execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request;
[0092] The processing module 33 is used to call the corresponding service resource to generate annotation information of the target document at the target execution time according to the execution information of the processing request.
[0093] According to one or more embodiments of the present disclosure, the execution information includes time information representing the target execution moment. When the response module 32 determines the execution information of the processing request in response to the processing request, it is specifically used to: obtain the document status of the target document according to the processing request, wherein the document status is a first document status or a second document status, the first document status represents that the target document is in an open state, and the second document status represents that the target document is in a closed state; when the document status is the first document status, the time information indicates the first execution moment, and when the document status is the second document status, the time information indicates the second execution moment, and the first execution moment is earlier than the second execution moment.
[0094] According to one or more embodiments of the present disclosure, the first execution moment is the current moment; the second execution moment is a low load moment, which is determined based on a low load period of the service resource; the response module 32 is also used to: obtain operation history data of the service resource; and determine the low load period of the service resource based on the operation history data.
[0095] According to one or more embodiments of the present disclosure, the execution information also includes resource information representing service resources, and the response module 32 is also used to: when the document status is a first document status, the resource information indicates a first service resource, and when the document status is a second document status, the resource information indicates a second service resource, and the resource amount of the first service resource is greater than the resource amount of the second service resource.
[0096] According to one or more embodiments of the present disclosure, the service resources include at least two task queues with different priorities: a processing module 33 is specifically used to: determine the target priority based on execution information; schedule the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority; and generate annotation information of the target document through the target task queue.
[0097] According to one or more embodiments of the present disclosure, all task queues corresponding to service resources share a target number of total traffic resources; the processing module 33 is also used to: detect whether there is a task backlog in each task queue and obtain a detection result; on the basis of the total traffic resources, according to the detection results corresponding to each task queue, schedule the traffic resources of at least two task queues to obtain an adjusted task queue.
[0098] According to one or more embodiments of the present disclosure, all task queues include at least a high-priority task queue; the processing module 33, on the basis of executing on the total traffic resources, schedules the traffic resources of at least two task queues according to the detection results corresponding to each task queue, and obtains the adjusted task queue, which is specifically used for: when each task queue has a task backlog, partially or completely scheduling the traffic resources of the non-high-priority task queue to the high-priority task queue, to obtain the adjusted task queue; when at least one task queue does not have a backlog of tasks, partially or completely scheduling the traffic resources of the task queue without a task backlog to the task queue with a task backlog, to obtain the adjusted task queue.
[0099] According to one or more embodiments of the present disclosure, when the processing module 33 detects whether there is a task backlog in each task queue and obtains the detection result, it is specifically used to: obtain the maximum queue length of each task queue; detect the current task offset in each task queue, and obtain the detection result based on the task offset and the maximum queue length.
[0100] According to one or more embodiments of the present disclosure, the document state of the target document includes a first document state and a second document state, the second document state includes a first sub-state and a second sub-state, and the task queue includes a high-priority task queue, a medium-priority queue and a low-priority queue, wherein the high-priority task queue is used to generate annotation information for the target document in the first sub-state, the first sub-state characterizing that the target document is in an open state for real-time editing; the medium-priority task queue is used to generate annotation information for the target document in the second sub-state, the second sub-state characterizing that the target document is in an open state that does not contain annotation information; the low-priority task queue is used to generate annotation information for the target document in the second document state, the second document state characterizing that the target document is in a closed state.
[0101] According to one or more embodiments of the present disclosure, the processing module 33 is further used to: configure the resource ratio of the traffic resources of the corresponding task queue at different times according to the priority of each task queue, wherein the priority is proportional to the resource ratio.
[0102] The receiving module 31, the responding module 32 and the processing module 33 are connected in sequence. The document processing service resource scheduling device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
[0103] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the electronic device 4 includes:
[0104] A processor 41, and a memory 42 communicatively connected to the processor 41;
[0105] The memory 42 stores computer executable instructions;
[0106] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 7 The document processing service resource scheduling method in the illustrated embodiment.
[0107] Optionally, the processor 41 and the memory 42 are connected via a bus 43 .
[0108] For related instructions, please refer to Figure 2-Figure 7 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.
[0109] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 7A document processing service resource scheduling method provided by any one of the corresponding embodiments.
[0110] The present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the present invention is realized. Figure 2-Figure 7 A document processing service resource scheduling method provided by any one of the corresponding embodiments.
[0111] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.
[0112] refer to Fig.10 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0113] like Fig.10 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0114] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0115] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0116] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0117] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0118] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0119] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0121] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit or module does not, in some cases, constitute a limitation on the unit itself.
[0122] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0123] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0124] In a first aspect, according to one or more embodiments of the present disclosure, a document processing service resource scheduling method is provided, comprising:
[0125] Receive a processing request for a target document, the processing request is used to generate annotation information for the target document, the annotation information is at least used to indicate the location of abnormal words in the target document, the abnormal words are difficult to understand words that have not been explained in the target document; in response to the processing request, determine execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request, and the target execution time matches the document status of the target document; according to the execution information of the processing request, call a corresponding service resource at the target execution time to generate annotation information for the target document.
[0126] According to one or more embodiments of the present disclosure, the execution information includes time information representing the target execution moment, and the determination of the execution information of the processing request in response to the processing request includes: obtaining the document status of the target document according to the processing request, wherein the document status is a first document status or a second document status, the first document status representing that the target document is in an open state, and the second document status representing that the target document is in a closed state; when the document status is the first document status, the time information indicates the first execution moment, and when the document status is the second document status, the time information indicates the second execution moment, and the first execution moment is earlier than the second execution moment.
[0127] According to one or more embodiments of the present disclosure, the first execution moment is the current moment; the second execution moment is a low load moment, and the low load moment is determined based on a low load period of the service resource; the method further includes: obtaining operation history data of the service resource; and determining the low load period of the service resource based on the operation history data.
[0128] According to one or more embodiments of the present disclosure, the execution information also includes resource information characterizing the service resources, and the method also includes: when the document status is the first document status, the resource information indicates a first service resource, and when the document status is the second document status, the resource information indicates a second service resource, and the resource amount of the first service resource is greater than the resource amount of the second service resource.
[0129] According to one or more embodiments of the present disclosure, the service resources include at least two task queues with different priorities: based on the execution information of the processing request, calling the corresponding target service resource at the target execution time to generate annotation information of the target document, including: determining the target priority based on the execution information; scheduling the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority; and generating the annotation information of the target document through the target task queue.
[0130] According to one or more embodiments of the present disclosure, all task queues corresponding to the service resources share a target number of total traffic resources; the method further includes: detecting whether there is a task backlog in each of the task queues to obtain a detection result; based on the total traffic resources, according to the detection results corresponding to each of the task queues, scheduling the traffic resources of at least two task queues to obtain an adjusted task queue.
[0131] According to one or more embodiments of the present disclosure, all the task queues include at least a high-priority task queue; based on the total traffic resources, according to the detection results corresponding to each of the task queues, the traffic resources of at least two task queues are scheduled to obtain an adjusted task queue, including: when each of the task queues has a task backlog, the traffic resources of the non-high-priority task queue are partially or fully scheduled to the high-priority task queue to obtain an adjusted task queue; when at least one of the task queues does not have a backlog of tasks, the traffic resources of the task queue without a task backlog are partially or fully scheduled to the task queue with a task backlog to obtain an adjusted task queue.
[0132] According to one or more embodiments of the present disclosure, the detecting whether there is a task backlog in each of the task queues and obtaining the detection result includes: obtaining the maximum queue length of each of the task queues; detecting the current task offset in each of the task queues, and obtaining the detection result based on the task offset and the maximum queue length.
[0133] According to one or more embodiments of the present disclosure, the document state of the target document includes a first document state and a second document state, the second document state includes a first sub-state and a second sub-state, and the task queue includes a high-priority task queue, a medium-priority queue and a low-priority queue, wherein the high-priority task queue is used to generate annotation information for the target document in the first sub-state, and the first sub-state represents that the target document is in an open state for real-time editing; the medium-priority task queue is used to generate annotation information for the target document in the second sub-state, and the second sub-state represents that the target document is in an open state that does not contain annotation information; the low-priority task queue is used to generate annotation information for the target document in the second document state, and the second document state represents that the target document is in a closed state.
[0134] According to one or more embodiments of the present disclosure, the method further includes: configuring the resource ratio of the traffic resources of the corresponding task queue at different times according to the priority of each task queue, wherein the priority is proportional to the resource ratio.
[0135] In a second aspect, according to one or more embodiments of the present disclosure, a document processing service resource scheduling device is provided, comprising:
[0136] A receiving module, configured to receive a processing request for a target document, wherein the processing request is used to generate annotation information of the target document, wherein the annotation information is used to at least indicate a position of an abnormal word in the target document, wherein the abnormal word is an incomprehensible word that has not been explained in the target document;
[0137] a response module, configured to determine, in response to the processing request, execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request;
[0138] The processing module is used to call the corresponding service resource at the target execution time to generate the annotation information of the target document according to the execution information of the processing request.
[0139] According to one or more embodiments of the present disclosure, the execution information includes time information representing the target execution moment. When the response module determines the execution information of the processing request in response to the processing request, it is specifically used to: obtain the document status of the target document according to the processing request, wherein the document status is a first document status or a second document status, the first document status representing that the target document is in an open state, and the second document status representing that the target document is in a closed state; when the document status is the first document status, the time information indicates the first execution moment, and when the document status is the second document status, the time information indicates the second execution moment, and the first execution moment is earlier than the second execution moment.
[0140] According to one or more embodiments of the present disclosure, the first execution moment is the current moment; the second execution moment is a low load moment, and the low load moment is determined based on a low load period of the service resource; the response module is further used to: obtain operation history data of the service resource; and determine the low load period of the service resource based on the operation history data.
[0141] According to one or more embodiments of the present disclosure, the execution information also includes resource information characterizing the service resources, and the response module is further used to: when the document status is the first document status, the resource information indicates the first service resource, and when the document status is the second document status, the resource information indicates the second service resource, and the resource amount of the first service resource is greater than the resource amount of the second service resource.
[0142] According to one or more embodiments of the present disclosure, the service resources include at least two task queues with different priorities: the processing module is specifically used to: determine the target priority according to the execution information; schedule the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority; and generate annotation information of the target document through the target task queue.
[0143] According to one or more embodiments of the present disclosure, all task queues corresponding to the service resources share a target number of total traffic resources; the processing module is also used to: detect whether there is a task backlog in each of the task queues to obtain a detection result; on the basis of the total traffic resources, according to the detection results corresponding to each of the task queues, schedule the traffic resources of at least two task queues to obtain an adjusted task queue.
[0144] According to one or more embodiments of the present disclosure, all the task queues include at least a high-priority task queue; the processing module, on the basis of executing the total traffic resources, schedules the traffic resources of at least two task queues according to the detection results corresponding to each of the task queues to obtain an adjusted task queue, and is specifically used for: when each of the task queues has a task backlog, partially or completely scheduling the traffic resources of the non-high-priority task queue to the high-priority task queue to obtain an adjusted task queue; when at least one of the task queues does not have a backlog of tasks, partially or completely scheduling the traffic resources of the task queue without a task backlog to the task queue with a task backlog to obtain an adjusted task queue.
[0145] According to one or more embodiments of the present disclosure, when the processing module detects whether there is a task backlog in each of the task queues and obtains the detection result, it is specifically used to: obtain the maximum queue length of each of the task queues; detect the current task offset in each of the task queues, and obtain the detection result based on the task offset and the maximum queue length.
[0146] According to one or more embodiments of the present disclosure, the document state of the target document includes a first document state and a second document state, the second document state includes a first sub-state and a second sub-state, and the task queue includes a high-priority task queue, a medium-priority queue and a low-priority queue, wherein the high-priority task queue is used to generate annotation information for the target document in the first sub-state, and the first sub-state represents that the target document is in an open state for real-time editing; the medium-priority task queue is used to generate annotation information for the target document in the second sub-state, and the second sub-state represents that the target document is in an open state that does not contain annotation information; the low-priority task queue is used to generate annotation information for the target document in the second document state, and the second document state represents that the target document is in a closed state.
[0147] According to one or more embodiments of the present disclosure, the processing module is also used to: configure the resource ratio of the traffic resources of the corresponding task queue at different times according to the priority of each task queue, wherein the priority is proportional to the resource ratio.
[0148] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0149] The memory stores computer-executable instructions;
[0150] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the document processing service resource scheduling method as described in the first aspect and various possible designs of the first aspect.
[0151] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the document processing service resource scheduling method described in the first aspect and various possible designs of the first aspect is implemented.
[0152] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the document processing service resource scheduling method as described in the first aspect and various possible designs of the first aspect.
[0153] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0154] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0155] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A document processing service resource scheduling method, characterized in that: include: Receiving a processing request for a target document, the processing request is used to generate annotation information of the target document, the annotation information is used to at least indicate the location of an abnormal word in the target document, the abnormal word is an incomprehensible word that has not been explained in the target document; In response to the processing request, determining execution information of the processing request, wherein the execution information is used to at least characterize a target execution time of the processing request, and the target execution time matches a document state of the target document; According to the execution information of the processing request, the corresponding service resource is called at the target execution time to generate annotation information of the target document.
2. The document processing service resource scheduling method according to claim 1, characterized in that: The execution information includes time information representing the target execution time, and the determining the execution information of the processing request in response to the processing request includes: According to the processing request, acquiring a document state of the target document, wherein the document state is a first document state or a second document state, the first document state represents that the target document is in an open state, and the second document state represents that the target document is in a closed state; When the document state is the first document state, the time information indicates a first execution time, and when the document state is the second document state, the time information indicates a second execution time, and the first execution time is earlier than the second execution time.
3. The document processing service resource scheduling method according to claim 2, characterized in that: The first execution time is the current time; the second execution time is a low load time, and the low load time is determined based on a low load period of the service resource; Also includes: Obtaining operation history data of the service resource; Based on the operation history data, a low load period of the service resource is determined.
4. The document processing service resource scheduling method according to claim 2, characterized in that: The execution information also includes resource information representing the service resources, and also includes: When the document status is the first document status, the resource information indicates a first service resource, and when the document status is the second document status, the resource information indicates a second service resource, and the resource amount of the first service resource is greater than the resource amount of the second service resource.
5. The document processing service resource scheduling method according to claim 1, characterized in that: The service resource includes at least two task queues with different priorities: The step of calling a corresponding target service resource at a target execution time to generate annotation information of the target document according to the execution information of the processing request includes: Determining target priorities based on the execution information; Scheduling the annotation information generation task corresponding to the processing request to the target task queue corresponding to the target priority; Annotation information of the target document is generated through the target task queue.
6. The document processing service resource scheduling method according to claim 5, characterized in that: All task queues corresponding to the service resources share the target amount of total traffic resources; and further comprising: Detecting whether there is a task backlog in each of the task queues, and obtaining a detection result; On the basis of the total traffic resources, according to the detection results corresponding to the task queues, the traffic resources of at least two task queues are scheduled to obtain adjusted task queues.
7. The document processing service resource scheduling method according to claim 6, characterized in that: All the task queues include at least a high priority task queue; Based on the total traffic resources, according to the detection results corresponding to the task queues, the traffic resources of at least two task queues are scheduled to obtain the adjusted task queues, including: When there is a backlog of tasks in each of the task queues, partially or completely dispatch the traffic resources of the non-high priority task queue to the high priority task queue to obtain an adjusted task queue; When at least one of the task queues does not have a backlog of tasks, part or all of the traffic resources of the task queue without a backlog of tasks are dispatched to the task queue with a backlog of tasks to obtain an adjusted task queue.
8. The document processing service resource scheduling method according to claim 6, characterized in that: The detecting whether there is a task backlog in each of the task queues and obtaining a detection result includes: Obtaining the maximum queue length of each of the task queues; The current task offset in each of the task queues is detected, and the detection result is obtained according to the task offset and the maximum queue length.
9. The document processing service resource scheduling method according to claim 5, characterized in that: The document state of the target document includes a first document state and a second document state, the second document state includes a first sub-state and a second sub-state, the task queue includes a high priority task queue, a medium priority queue and a low priority queue, wherein, The high priority task queue is used to generate annotation information of a target document in a first sub-state, wherein the first sub-state indicates that the target document is in an open state for real-time editing; The medium priority task queue is used to generate annotation information of a target document in a second sub-state, wherein the second sub-state indicates that the target document is in an open state without annotation information; The low priority task queue is used to generate annotation information of a target document in a second document state, where the second document state indicates that the target document is in a closed state.
10. The document processing service resource scheduling method according to claim 5, characterized in that: Also includes: According to the priority of each task queue, the resource ratio of the traffic resources of the corresponding task queue at different times is configured, wherein the priority is proportional to the resource ratio.
11. A document processing service resource scheduling device, characterized in that: include: A receiving module, configured to receive a processing request for a target document, wherein the processing request is used to generate annotation information of the target document, wherein the annotation information is used to at least indicate a position of an abnormal word in the target document, wherein the abnormal word is an incomprehensible word that has not been explained in the target document; a response module, configured to determine, in response to the processing request, execution information of the processing request, wherein the execution information is at least used to characterize a target execution time of the processing request; The processing module is used to call the corresponding service resource at the target execution time to generate the annotation information of the target document according to the execution information of the processing request.
12. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the document processing service resource scheduling method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the document processing service resource scheduling method according to any one of claims 1 to 10 is implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the document processing service resource scheduling method according to any one of claims 1 to 10 is implemented.