CN112527416A - Task processing method and device, computer equipment and storage medium - Google Patents

Task processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112527416A
CN112527416A CN202011573604.7A CN202011573604A CN112527416A CN 112527416 A CN112527416 A CN 112527416A CN 202011573604 A CN202011573604 A CN 202011573604A CN 112527416 A CN112527416 A CN 112527416A
Authority
CN
China
Prior art keywords
service processes
task processing
target
calling
target service
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.)
Pending
Application number
CN202011573604.7A
Other languages
Chinese (zh)
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.)
Shenzhen Zhuiyi Technology Co Ltd
Original Assignee
Shenzhen Zhuiyi 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 Shenzhen Zhuiyi Technology Co Ltd filed Critical Shenzhen Zhuiyi Technology Co Ltd
Priority to CN202011573604.7A priority Critical patent/CN112527416A/en
Publication of CN112527416A publication Critical patent/CN112527416A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a task processing method, a task processing device, computer equipment and a storage medium. The method comprises the following steps: receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request; determining the calling sequence of the target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes; and sequentially calling the target service processes to perform task processing according to the calling sequence to obtain a processing result. By adopting the method, the configuration operation can be simplified, and the task processing efficiency can be improved.

Description

Task processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of task processing technologies, and in particular, to a task processing method and apparatus, a computer device, and a storage medium.
Background
A task processes a plurality of subtasks that are usually included in a request. For example, a task processing request of text analysis includes a word segmentation subtask, a steering subtask, and an insertion vector subtask.
In the related art, services corresponding to a plurality of subtasks are sequentially called through a pre-configured interface to process each subtask. For example, a word segmentation service is called to process a word segmentation subtask, and then the word segmentation service calls a steering vector service through a pre-configured interface to process a steering quantum task; and then, the vector insertion server calls an insertion vector service through a pre-configured interface to process the insertion vector quantum task.
However, when the processing order of the plurality of subtasks is changed, the interface needs to be reconfigured. For example, a word segmentation service is invoked first; the word segmentation service calls an insertion vector service according to the reconfigured interface; the insertion vector service calls the vector steering service according to the reconfigured interface. The task processing mode has high service coupling, and the interface needs to be reconfigured when the processing sequence of the subtasks is changed every time, so that not only is the configuration operation complex, but also the task processing efficiency is low.
Disclosure of Invention
In view of the above, it is necessary to provide a task processing method, a task processing apparatus, a computer device, and a storage medium, which can simplify configuration operations and improve task processing efficiency.
A method of task processing, the method comprising:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of a plurality of target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result.
In one embodiment, before the sequentially invoking the plurality of target service processes according to the invocation order to perform task processing, the method further includes:
detecting whether a preset shared memory has a residual storage space or not;
correspondingly, the sequentially calling a plurality of target service processes according to the calling sequence to perform task processing to obtain a processing result includes:
and under the condition that the residual storage space exists in the shared memory is detected, sequentially calling the target service processes according to the calling sequence, and performing task processing through the target service processes and the shared memory to obtain a processing result.
In one embodiment, the target service process comprises a first service process and a second service process; the aforementioned sequentially invoking a plurality of target service processes according to the invocation sequence under the condition that the remaining storage space exists in the shared memory is detected, and performing task processing through the plurality of target service processes and the shared memory to obtain a processing result, includes:
determining a target storage position according to the residual storage space of the shared memory;
calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position;
and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
In one embodiment, the task processing request carries service parameters; the determining a plurality of target service processes to be called according to the task processing request includes:
determining a target service process according to the service parameters;
correspondingly, determining the calling sequence of a plurality of target service processes according to a preset configuration file comprises the following steps:
analyzing the configuration file to obtain the dependency relationship among the service processes;
and determining a calling sequence according to the dependency relationship among the service processes and the target service processes.
In one embodiment, before determining the calling order of the target service processes according to the preset configuration file, the method further includes:
receiving configuration information input by a user, and generating a configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of processes of the service processes, and the log level.
In one embodiment, the method further comprises:
and carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
A task processing device, the device comprising:
the process determining module is used for receiving the task processing request and determining a plurality of target service processes to be called according to the task processing request;
the sequence determining module is used for determining the calling sequence of the target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and the task processing module is used for sequentially calling the target service processes according to the calling sequence to perform task processing so as to obtain a processing result.
In one embodiment, the apparatus further comprises:
the space detection module is used for detecting whether a preset shared memory has a residual storage space;
correspondingly, the task processing module is specifically configured to, when it is detected that the remaining storage space exists in the shared memory, sequentially call the plurality of target service processes according to the call sequence, and perform task processing through the plurality of target service processes and the shared memory to obtain a processing result.
In one embodiment, the target service process comprises a first service process and a second service process; the task processing module is specifically configured to determine a target storage location according to the remaining storage space of the shared memory; calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position; and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
In one embodiment, the task processing request carries service parameters; the process determining module is specifically configured to determine a target service process according to the service parameter;
correspondingly, the sequence determining module is specifically configured to analyze the configuration file to obtain a dependency relationship between the service processes; and determining a calling sequence according to the dependency relationship among the service processes and the target service processes.
In one embodiment, the apparatus further comprises:
the file generation module is used for receiving configuration information input by a user and generating a configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of processes of the service processes, and the log level.
In one embodiment, the apparatus further comprises:
and the process updating module is used for carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of a plurality of target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of a plurality of target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result.
The task processing method, the task processing device, the computer equipment and the storage medium receive the task processing request and determine a plurality of target service processes to be called according to the task processing request; determining the calling sequence of a plurality of target service processes according to a preset configuration file; and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result. In the embodiment of the disclosure, the dependency relationship among the service processes is set in the configuration file, and the calling sequence of the service processes can be changed by changing the dependency relationship among the service processes without reconfiguring the interface, thereby simplifying the configuration operation and improving the task processing efficiency. .
Drawings
FIG. 1 is a flowchart illustrating a task processing method according to an embodiment;
FIG. 2 is a flow diagram illustrating a process for utilizing shared memory in one embodiment;
FIG. 3 is a flow diagram that illustrates the steps of determining a calling order for a plurality of target service processes, in one embodiment;
FIG. 4 is a block diagram showing a configuration of a task processing device according to an embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a task processing method is provided, and this embodiment is illustrated by applying this method to a terminal, and it is to be understood that this method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented by interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be implemented by an independent server or a server cluster formed by a plurality of servers. The method comprises the following steps:
step 101, receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request.
The task processing request carries a plurality of subtasks, and each subtask needs to call at least one target service process.
And the terminal receives the task processing request and determines a plurality of target service processes to be called according to the subtasks carried by the task processing request. For example, the task processing request includes a subtask a, a subtask B, and a subtask C, and the terminal determines that the target service process to be invoked includes a service process a, a service process B, and a service process C. The embodiment of the disclosure does not limit the subtask and the service process corresponding to the subtask.
Step 102, determining the calling sequence of a plurality of target service processes according to a preset configuration file.
Wherein, the configuration file is provided with the dependency relationship among the service processes.
The terminal is preset with a configuration file, and the configuration file is provided with a dependency relationship among service processes. For example, the dependency relationship between the service process a, the service process B, and the calling service process C is set in the configuration file.
After the terminal determines a plurality of target service processes to be called, the calling sequence of the plurality of target service processes is determined according to the dependency relationship between the service processes set in the configuration file. For example, the dependency relationship in the configuration file is that the service process a depends on the service process B, the service process B depends on the service process C, that is, the service process a needs the processing result of the service process B, and the service process B needs the processing result of the service process C, so that the terminal can determine that the calling sequence of the target service processes is the service process C, the service process B, and the service process a in sequence. For another example, the dependency relationship in the configuration file is that the service process C depends on the service process B, the service process B depends on the service process a, that is, the service process C needs the processing result of the service process B, and the service process B needs the processing result of the service process a, so that the terminal can determine that the calling sequence of the target service processes is the service process a, the service process B, and the service process C in sequence.
And 103, sequentially calling a plurality of target service processes according to the calling sequence to perform task processing to obtain a processing result.
After determining the calling sequence of the target service processes, the terminal sequentially calls the target service processes according to the calling sequence to perform task processing, and then a processing result can be obtained.
For example, the calling sequence is service process a, service process B, and service process C, the terminal calls service process a in sequence to perform task processing to obtain result 1, then calls service process B to perform task processing according to result 1 to obtain result 2, and then calls service process C to perform task processing according to result 2 to obtain a final processing result.
In the task processing method, a task processing request is received, and a plurality of target service processes to be called are determined according to the task processing request; determining the calling sequence of a plurality of target service processes according to a preset configuration file; and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result. In the embodiment of the disclosure, the dependency relationship among the service processes is set in the configuration file, and the calling sequence of the service processes can be changed by changing the dependency relationship among the service processes without reconfiguring the interface, thereby simplifying the configuration operation and improving the task processing efficiency.
In an embodiment, as shown in fig. 2, on the basis of the foregoing embodiment, the method may further include the step of using the shared memory:
and 104, detecting whether the preset shared memory has a residual storage space.
The terminal presets a shared memory, and the size of the storage space of the shared memory can be configured according to the requirements of users. And each service process can perform read-write operation on the shared memory. Before sequentially calling a plurality of target service processes to perform task processing according to the calling sequence, the terminal detects whether a residual storage space exists in the shared memory, and if the residual storage space exists in the shared memory, the step 105 is executed; and if the shared memory does not have the residual storage space, returning an error code.
And 105, under the condition that the residual storage space exists in the shared memory is detected, sequentially calling a plurality of target service processes according to the calling sequence, and performing task processing through the plurality of target service processes and the shared memory to obtain a processing result.
And when detecting that the residual storage space exists in the shared memory, the terminal sequentially calls a plurality of target service processes according to the calling sequence, and when calling the target service processes each time, the target service processes read data from the shared memory and perform task processing, and then store the processing result into the shared memory.
In one embodiment, the target service process comprises a first service process and a second service process; the process that the terminal calls a plurality of target service processes to perform task processing can include: the terminal determines a target storage position according to the residual storage space of the shared memory; calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position; and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units. For example, the shared memory is divided into 5 storage units, and the storage unit 2 is the remaining storage space in the shared memory, and the target storage location is determined as the storage unit 2. And then, the terminal calls the first service process according to the calling sequence, the first service process reads the first data from the storage unit 2, performs task processing according to the first data to obtain second data, and stores the second data into the storage unit 2. And then, the terminal calls a second service process according to the calling sequence, the second service process reads second data from the storage unit 2, performs task processing according to the second data to obtain a processing result, and stores the processing result in the storage unit 2.
In one embodiment, the called target service process feeds back the completion of processing to the terminal after processing the task. And after the tasks are processed to obtain a final processing result, the terminal returns the processing result to the party sending the task processing request.
In one embodiment, after the terminal returns the processing result, the corresponding storage unit in the shared memory is released. For example, the terminal returns the processing result in the storage unit 2 to the party that transmitted the task processing request, and then releases the storage unit 2.
In the above embodiment, whether a preset shared memory has a remaining storage space is detected, and when the remaining storage space is detected in the shared memory, a plurality of target service processes are sequentially called according to a calling sequence, and a processing result is obtained by performing task processing on the plurality of target service processes and the shared memory. In the embodiment of the disclosure, the processing result is stored by using the shared memory, and the processing result does not need to be transmitted to the next service process by the previous service process, so that the service processes can be decoupled, and the calling sequence of the service processes can be configured more flexibly.
In one embodiment, the task processing request carries service parameters; the step of determining a plurality of target service processes to be invoked according to the task processing request may include: and determining a target service process according to the service parameters.
After the terminal receives the task processing request, if the task processing request does not carry service parameters or the carried service parameters are default values, the terminal determines that the target service process to be called is all service processes. And if the task processing request carries service parameters and the service parameters specify the service process to be called, the terminal determines the target service process to be called according to the service parameters.
For example, there are 10 service processes, server process 1 to server process 10. After the terminal receives the task processing request, if the task processing request does not carry service parameters, determining that the target service processes to be called are a service process 1 to a service process 10. And if the task processing request carries the service parameter 6, determining that the target service process to be called is the service process 6.
The service parameters are carried in the task processing request, and the terminal can call part of the service processes according to the service parameters, so that the calling mode of the service processes is more flexible.
In an embodiment, as shown in fig. 3, the step of determining the calling order of the target service processes according to the preset configuration file may include:
step 201, analyzing the configuration file to obtain the dependency relationship between the service processes.
And after the terminal determines the target service process according to the server parameters, analyzing the configuration file to obtain the dependency relationship among the service processes.
For example, parsing the configuration file to obtain the dependency relationship between the service processes includes: the service process 2 depends on the service process 1, the service process 3 depends on the service process 2, the service process 4 depends on the service process 3, the service process 5 depends on the service process 3, the service process 6 depends on the service process 5, the service process 7 depends on the service process 5, the service process 8 depends on 7, the service process 9 depends on 8, and the service process 10 depends on 7.
And after the terminal obtains the dependency relationship among the service processes, supplementing the target service process to be called according to the dependency relationship and the determined target service process.
For example, the determined target service process is service process 6, and the dependency relationship includes: the service process 6 depends on the service process 5, the service process 5 depends on the service process 3, the service process 3 depends on the service process 2, and the service process 2 depends on the service process 1. And the terminal determines the service process 1, the service process 2, the service process 3 and the service process 5 as target service processes to be called according to the dependency relationship between the service process 6 and the service process 6.
Step 202, determining a calling sequence according to the dependency relationship among the service processes and the plurality of target service processes.
And after the terminal analyzes the dependency relationship and determines the target service process to be called, determining the calling sequence of the plurality of target service processes according to the dependency relationship.
For example, determining the calling sequence from front to back according to the dependency relationship and the target service process is as follows: service process 1, service process 2, service process 3, service process 5, service process 6.
In the step of determining the calling sequence of the target service processes according to the preset configuration file, the terminal analyzes the configuration file to obtain the dependency relationship among the service processes; and determining a calling sequence according to the dependency relationship among the service processes and the target service processes. In the embodiment of the disclosure, the calling sequence of the plurality of target service processes can be determined according to the configuration file, and when the calling sequence is changed, only the configuration file needs to be updated without reconfiguring an interface, so that the configuration operation is simplified, and the task processing efficiency is improved.
In an embodiment, before determining the calling order of the target service processes according to the preset configuration file, the embodiment of the present disclosure may further include: receiving configuration information input by a user, and generating a configuration file according to the configuration information; the configuration information comprises the dependency relationship among the service processes, the process number of the service processes and the log level.
Before the task processing, the terminal may perform configuration of the dependency relationship in advance, that is, the user inputs configuration information such as the dependency relationship between the service processes, the number of the service processes, and the log level to the terminal, and the terminal receives the configuration information input by the user and generates a configuration file according to the configuration information for storage.
In one embodiment, a plurality of preset service processes are subjected to configuration updating processing according to a configuration file.
The terminal is preset with a plurality of service processes, and after receiving the configuration information and generating the configuration file, the terminal performs configuration updating processing on the plurality of service processes according to the configuration file.
For example, the dependency relationship among a plurality of service processes is updated, the number of processes of the service processes is updated, and the log level of the processing log generated by performing the task processing on the service processes is updated. The embodiment of the present disclosure does not limit the configuration update process.
In the embodiment, the user can input the configuration information according to the requirement, so that the terminal generates the configuration file, and further performs configuration updating processing on the service process.
It should be understood that although the various steps in the flowcharts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a task processing device including:
the process determining module 301 is configured to receive a task processing request, and determine a plurality of target service processes to be invoked according to the task processing request;
a sequence determining module 302, configured to determine, according to a preset configuration file, a call sequence of a plurality of target service processes; the configuration file is provided with the dependency relationship among the service processes;
and the task processing module 303 is configured to sequentially call the multiple target service processes according to the call sequence to perform task processing, so as to obtain a processing result.
In one embodiment, the apparatus further comprises:
the space detection module is used for detecting whether a preset shared memory has a residual storage space;
correspondingly, the task processing module 303 is specifically configured to, when it is detected that the remaining storage space exists in the shared memory, sequentially call the multiple target service processes according to the call sequence, and perform task processing through the multiple target service processes and the shared memory to obtain a processing result.
In one embodiment, the target service process comprises a first service process and a second service process; the task processing module 303 is specifically configured to determine a target storage location according to the remaining storage space of the shared memory; calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position; and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
In one embodiment, the task processing request carries service parameters; the process determining module 301 is specifically configured to determine a target service process according to the service parameter;
correspondingly, the order determining module 302 is specifically configured to analyze the configuration file to obtain a dependency relationship between the service processes; and determining a calling sequence according to the dependency relationship among the service processes and the target service processes.
In one embodiment, the apparatus further comprises:
the file generation module is used for receiving configuration information input by a user and generating a configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of processes of the service processes, and the log level.
In one embodiment, the apparatus further comprises:
and the process updating module is used for carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
For specific limitations of the task processing device, reference may be made to the above limitations of the task processing method, which are not described herein again. The respective modules in the task processing device described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of task processing. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of a plurality of target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting whether a preset shared memory has a residual storage space or not;
and under the condition that the residual storage space exists in the shared memory is detected, sequentially calling the target service processes according to the calling sequence, and performing task processing through the target service processes and the shared memory to obtain a processing result.
In one embodiment, the target service process includes a first service process and a second service process; the processor, when executing the computer program, further performs the steps of:
determining a target storage position according to the residual storage space of the shared memory;
calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position;
and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
In one embodiment, the task processing request carries service parameters; the processor, when executing the computer program, further performs the steps of:
determining a target service process according to the service parameters;
analyzing the configuration file to obtain the dependency relationship among the service processes;
and determining a calling sequence according to the dependency relationship among the service processes and the target service processes.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving configuration information input by a user, and generating a configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of processes of the service processes, and the log level.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of a plurality of target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling a plurality of target service processes according to the calling sequence to perform task processing, so as to obtain a processing result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether a preset shared memory has a residual storage space or not;
and under the condition that the residual storage space exists in the shared memory is detected, sequentially calling the target service processes according to the calling sequence, and performing task processing through the target service processes and the shared memory to obtain a processing result.
In one embodiment, the target service process includes a first service process and a second service process; the computer program when executed by the processor further realizes the steps of:
determining a target storage position according to the residual storage space of the shared memory;
calling a first service process according to the calling sequence, processing first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position;
and calling a second service process according to the calling sequence, processing second data stored in the target storage position through the second service process to obtain a processing result, and storing the processing result to the target storage position.
In one embodiment, the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
In one embodiment, the task processing request carries service parameters; the computer program when executed by the processor further realizes the steps of:
determining a target service process according to the service parameters;
analyzing the configuration file to obtain the dependency relationship among the service processes;
and determining a calling sequence according to the dependency relationship among the service processes and the target service processes.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving configuration information input by a user, and generating a configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of processes of the service processes, and the log level.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for processing a task, the method comprising:
receiving a task processing request, and determining a plurality of target service processes to be called according to the task processing request;
determining the calling sequence of the target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and sequentially calling the target service processes to perform task processing according to the calling sequence to obtain a processing result.
2. The method of claim 1, wherein prior to said sequentially invoking said plurality of target service processes for task processing according to said invocation order, said method further comprises:
detecting whether a preset shared memory has a residual storage space or not;
correspondingly, the sequentially calling the target service processes according to the calling sequence to perform task processing to obtain a processing result, including:
and under the condition that the shared memory is detected to have the residual storage space, sequentially calling the target service processes according to the calling sequence, and performing task processing through the target service processes and the shared memory to obtain the processing result.
3. The method of claim 2, wherein the target service process comprises a first service process and a second service process; the step of sequentially calling the target service processes according to the calling sequence and performing task processing through the target service processes and the shared memory to obtain the processing result when detecting that the remaining storage space exists in the shared memory comprises:
determining a target storage position according to the residual storage space of the shared memory;
calling the first service process according to the calling sequence, processing the first data stored in the target storage position through the first service process to obtain second data, and storing the second data to the target storage position;
and calling the second service process according to the calling sequence, processing the second data stored in the target storage position through the second service process to obtain the processing result, and storing the processing result in the target storage position.
4. The method according to claim 3, wherein the shared memory is divided into a plurality of storage units, and the target storage location is any one of the plurality of storage units.
5. The method according to claim 1, wherein the task processing request carries service parameters; the determining a plurality of target service processes to be called according to the task processing request comprises:
determining the target service process according to the service parameters;
correspondingly, the determining the calling sequence of the target service processes according to the preset configuration file includes:
analyzing the configuration file to obtain the dependency relationship among the service processes;
and determining the calling sequence according to the dependency relationship among the service processes and the target service processes.
6. The method of claim 1, wherein before the determining the calling order of the plurality of target service processes according to the preset configuration file, the method further comprises:
receiving configuration information input by a user, and generating the configuration file according to the configuration information; the configuration information includes the dependency relationship between the service processes, the number of the service processes, and the log level.
7. The method of claim 6, further comprising:
and carrying out configuration updating processing on a plurality of preset service processes according to the configuration file.
8. A task processing apparatus, characterized in that the apparatus comprises:
the process determining module is used for receiving a task processing request and determining a plurality of target service processes to be called according to the task processing request;
the sequence determining module is used for determining the calling sequence of the target service processes according to a preset configuration file; the configuration file is provided with the dependency relationship among the service processes;
and the task processing module is used for sequentially calling the target service processes to perform task processing according to the calling sequence to obtain a processing result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011573604.7A 2020-12-24 2020-12-24 Task processing method and device, computer equipment and storage medium Pending CN112527416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011573604.7A CN112527416A (en) 2020-12-24 2020-12-24 Task processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011573604.7A CN112527416A (en) 2020-12-24 2020-12-24 Task processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112527416A true CN112527416A (en) 2021-03-19

Family

ID=74976685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011573604.7A Pending CN112527416A (en) 2020-12-24 2020-12-24 Task processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527416A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553120A (en) * 2021-06-30 2021-10-26 珠海豹趣科技有限公司 Task execution method and device, storage medium and electronic equipment
CN116149689A (en) * 2023-04-24 2023-05-23 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716871A (en) * 2004-06-28 2006-01-04 华为技术有限公司 Safety managing method for network control system
CN109213611A (en) * 2018-08-01 2019-01-15 天津字节跳动科技有限公司 The striding course means of communication, device, terminal and storage medium
CN109491777A (en) * 2018-11-12 2019-03-19 北京字节跳动网络技术有限公司 Task executing method, device, equipment and storage medium
CN110134532A (en) * 2019-05-13 2019-08-16 浙江商汤科技开发有限公司 A kind of information interacting method and device, electronic equipment and storage medium
CN111176801A (en) * 2019-07-17 2020-05-19 腾讯科技(深圳)有限公司 Multi-process management method, device, equipment and storage medium
CN111857995A (en) * 2020-06-30 2020-10-30 海尔优家智能科技(北京)有限公司 Process scheduling method and device, storage medium and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716871A (en) * 2004-06-28 2006-01-04 华为技术有限公司 Safety managing method for network control system
CN109213611A (en) * 2018-08-01 2019-01-15 天津字节跳动科技有限公司 The striding course means of communication, device, terminal and storage medium
CN109491777A (en) * 2018-11-12 2019-03-19 北京字节跳动网络技术有限公司 Task executing method, device, equipment and storage medium
CN110134532A (en) * 2019-05-13 2019-08-16 浙江商汤科技开发有限公司 A kind of information interacting method and device, electronic equipment and storage medium
CN111176801A (en) * 2019-07-17 2020-05-19 腾讯科技(深圳)有限公司 Multi-process management method, device, equipment and storage medium
CN111857995A (en) * 2020-06-30 2020-10-30 海尔优家智能科技(北京)有限公司 Process scheduling method and device, storage medium and electronic device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553120A (en) * 2021-06-30 2021-10-26 珠海豹趣科技有限公司 Task execution method and device, storage medium and electronic equipment
CN116149689A (en) * 2023-04-24 2023-05-23 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment
CN116149689B (en) * 2023-04-24 2023-07-04 上海观安信息技术股份有限公司 Software installation method and device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
WO2020253061A1 (en) Page generating method and apparatus, computer device, and storage medium
CN106547580B (en) Method and device for hooking function, mobile terminal and storage medium
US9990214B2 (en) Dynamic agent delivery
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN111008132B (en) Application debugging method and device for Android system, computer equipment and storage medium
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN110362356B (en) Function data processing method and device, computer equipment and storage medium
CN112860457A (en) Software development kit calling method and device, computer equipment and storage medium
CN109522021B (en) Parameter callback processing method and device, electronic equipment and storage medium
CN110597552A (en) Configuration method, device and equipment of project continuous integration pipeline and storage medium
US10599444B2 (en) Extensible input stack for processing input device data
CN111580883B (en) Application program starting method, device, computer system and medium
WO2019139738A1 (en) Extensible input stack for processing input device data
CN114489698A (en) Application program installation method and device
CN112764729B (en) Application software development method, device, computer equipment and readable storage medium
CN112543194B (en) Mobile terminal login method and device, computer equipment and storage medium
CN111124932B (en) Scheme verification method, system, device, computer equipment and storage medium
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
CN111666116A (en) SDK calling method and device, computer equipment and storage medium
CN111859403A (en) Method and device for determining dependency vulnerability, electronic equipment and storage medium
CN112149951A (en) Risk control method and device, computer equipment and storage medium
CN114661301B (en) Graphics processing unit compiling method, device, compiling acceleration library and storage medium
CN111506299B (en) Front-end data verification method and device and computer equipment
CN113504936B (en) Software version release method, computer device and storage medium
KR102677540B1 (en) Method and system for protecting native libraries

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