CN110489219B - Method, device, medium and electronic equipment for scheduling functional objects - Google Patents

Method, device, medium and electronic equipment for scheduling functional objects Download PDF

Info

Publication number
CN110489219B
CN110489219B CN201910715763.7A CN201910715763A CN110489219B CN 110489219 B CN110489219 B CN 110489219B CN 201910715763 A CN201910715763 A CN 201910715763A CN 110489219 B CN110489219 B CN 110489219B
Authority
CN
China
Prior art keywords
calling
directed
functional
functional objects
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910715763.7A
Other languages
Chinese (zh)
Other versions
CN110489219A (en
Inventor
刘昭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910715763.7A priority Critical patent/CN110489219B/en
Publication of CN110489219A publication Critical patent/CN110489219A/en
Application granted granted Critical
Publication of CN110489219B publication Critical patent/CN110489219B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a method, a device, a medium and an electronic device for scheduling functional objects. The method comprises the following steps: acquiring interface information of a functional object in the process; establishing a directed logic relationship between the functional objects according to the interface information and a directed sorting rule; and calling functional objects in sequence according to the interface information based on the direction of the directed logic relationship. According to the method and the device, a calling sequencing relation is established among the functional objects among the threads, so that the process can call the functional objects in sequence according to the sequencing relation, and the mutual interference among the functional objects is avoided, and the additional expense of a system is avoided. The newly added functional object does not need to concern about the asynchronous problem, and can be added to the process according to the rule of the interface information, thereby simplifying the programming complexity. And the CPU kernel can process the calling thread in parallel under extreme conditions, so that the extra overhead caused by the occupation of the CPU time slice is avoided. Meanwhile, each functional object is conveniently monitored.

Description

Method, device, medium and electronic equipment for scheduling functional objects
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for scheduling a functional object.
Background
During the operation of a computer system, situations are often encountered in which a large number of tasks need to be performed in a short period of time. For example, in the Android system, each application (App) executes a series of batch tasks during the startup phase.
In a short time, if a large number of tasks are executed, the system runs slowly, a large amount of time is consumed, and the use experience of a user is reduced. Therefore, efficient completion of batch tasks is critical to system performance.
In order to solve the above technical problem, a design manner of combining a master thread and a slave thread is generally adopted in an APP, and the work of the master thread is shared through asynchronous design, that is, a plurality of threads execute these tasks together.
However, in an asynchronous design in an APP, there is a problem that functional objects cooperate with each other between threads, that is, the functional objects have a dependency relationship of mutual constraints in the threads. Therefore, the difficulty of development is increased.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
An object of the present disclosure is to provide a method, an apparatus, a medium, and an electronic device for scheduling a functional object, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a method for scheduling a functional object, including:
acquiring interface information of a functional object in the process;
establishing a directed logic relationship between the functional objects according to the interface information and a directed sorting rule;
and calling functional objects in sequence according to the interface information based on the direction of the directed logic relationship.
According to a second aspect, the present disclosure provides an apparatus for scheduling a functional object, including:
the acquiring unit is used for acquiring the interface information of the functional object in the process;
the establishing unit is used for establishing a directed logic relationship between the functional objects according to the interface information and the directed sorting rule;
and the calling unit is used for calling the functional objects in sequence according to the interface information based on the direction of the directed logic relationship.
According to a third aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of scheduling functional objects according to any of the first aspects.
According to a fourth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of scheduling functional objects according to any of the first aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the disclosure provides a method, a device, a medium and an electronic device for scheduling functional objects. The method comprises the following steps: acquiring interface information of a functional object in the process; establishing a directed logic relationship between the functional objects according to the interface information and a directed sorting rule; and calling functional objects in sequence according to the interface information based on the direction of the directed logic relationship.
According to the method and the device, a calling sequencing relation is established among the functional objects among the threads, so that the process can call the functional objects in sequence according to the sequencing relation, and the mutual interference among the functional objects is avoided, and the additional expense of a system is avoided. The newly added functional object does not need to concern about the asynchronous problem, and can be added to the process according to the rule of the interface information, thereby simplifying the programming complexity. And the CPU kernel can process the calling thread in parallel under extreme conditions, so that the extra overhead caused by the occupation of the CPU time slice is avoided. Meanwhile, each functional object is conveniently monitored.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 illustrates a flow diagram of a method of scheduling functional objects according to an embodiment of the present disclosure;
FIG. 2 illustrates a block diagram of elements of an apparatus for scheduling functional objects according to an embodiment of the present disclosure;
fig. 3 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment provided by the present disclosure is an embodiment of a method for scheduling a functional object.
The following describes an embodiment of the present disclosure in detail with reference to fig. 1, where fig. 1 is a flowchart of a method for scheduling a functional object according to an embodiment of the present disclosure.
Step S101, acquiring interface information of the functional object in the process.
A process is a running activity of a program with independent functions with respect to a certain data set. It can apply for and own system resources, and is a dynamic concept and an active entity. It is not just the code of the program but also the current activity, represented by the value of the program counter and the contents of the processing registers.
The method is applied to a process.
A thread is the smallest unit that an operating system can perform arithmetic scheduling. It is included in the process and is the actual unit of operation in the process. A thread refers to a single sequential control flow in a process, multiple threads can be concurrently executed in a process, and each thread executes different tasks in parallel.
The functional object is a section of program capable of completing independent functions in one thread. For example, a functional object is a function or method. The multiple functional objects may be in a parallel relationship or a nested relationship. For example, A, B, C and D are four function objects, B and C are function objects in which two of A have a parallel relationship, that is, B, C has a nested relationship with A; and D is a functional object in B, namely D and B have a nested relation.
The embodiment of the disclosure provides interface information of a functional object. The process establishes the logic relation of calling between the function objects and the corresponding calling thread through the interface information, thereby realizing the ordered calling of the function objects. The newly added functional object does not need to concern about the asynchronous problem, and can be added to the process according to the rule of the interface information, thereby simplifying the programming complexity.
The interface information includes: the method comprises the following steps of calling information of the function objects, dependency relationship among the function objects, process characteristic information, calling thread pool types and calling thread characteristic information corresponding to the calling thread pool types.
For example, the function object call information is description information of a function or a method.
For example, continuing with A, B, C and D above is an example of four functional objects, the dependencies between the functional objects are: b and C are dependent on A; d is dependent on B.
The type of the call thread pool is used for conveniently managing the number, functions and purposes of the call threads. The method comprises the following steps: a CPU intensive type and/or an IO intensive type.
The number of CPU-intensive types of call threads depends on the core architecture of the CPU. Meanwhile, the executed excessive function objects can be executed in turn only by preempting the CPU time slice, and the additional cost of system resources and time brought by frequently switching the function objects is increased. Therefore, optionally, the number of calling threads of the CPU intensive type is less than or equal to the number of cores of the CPU. For example, if the number of the cores of the CPU is 8, the number of the call threads of the CPU-intensive type is less than or equal to 8, and it is ensured that the 8 CPU cores can process 8 call threads in parallel under extreme conditions, so as to avoid the extra overhead caused by preempting the CPU time slice.
The number of IO-intensive call threads is less dependent on the kernel architecture of the CPU, and the call threads can be in a waiting state when the CPU cannot process redundant call threads. No further restrictions are placed on the number of call threads of the IO-intensive type.
In addition, the user can customize the type of the calling thread pool according to the functional requirement. The disclosed embodiments are not limiting.
And step S102, establishing a directed logic relationship between the functional objects according to the interface information and the directed sorting rule.
The purpose of this step is to establish a sort relation of calling between the function objects, so that the process can call the function objects in turn according to the sort relation, and avoid the mutual interference between the function objects and the additional overhead of the system.
Optionally, the establishing a directed logical relationship between the functional objects according to the interface information and the directed sorting rule includes the following steps:
and step S102-1, establishing a directed logic relationship between the functional objects according to the dependency relationship and the directed sorting rule between the functional objects.
For example, continuing with A, B, C and D above is an example of four functional objects, the dependencies between the functional objects are: b and C are dependent on A; d is dependent on B; the directed logical relationship is represented as:
A——>B、C——>D。
optionally, the dependency relationship between the functional objects includes: a directed graph data structure of functional objects.
The biggest difference between directed and undirected graphs is that each path has unidirectional directivity.
A directed graph data structure is an ordered triplet (V (D), A (D), ψ (D)) of a directed graph D, where ψ (D) is the correlation function that makes each element in A (D) (called a directed edge or arc) correspond to an ordered pair of elements in V (D) (called vertices or points).
The establishing of the directed logic relationship among the functional objects according to the dependency relationship and the directed sorting rule among the functional objects comprises the following steps:
and S102-1-1, establishing a directed logic relationship between the functional objects according to the directed graph data structure and the directed sorting rule.
Optionally, the directed logical relationship includes: directed acyclic logic relationships.
Optionally, the directed ordering rule includes: topological ordering rules of directed graphs.
A directed acyclic logic relationship graph G is subjected to topological ordering, all vertexes in the graph G are arranged into a linear sequence, so that any pair of vertexes u and v in the graph has the condition that if an edge < u, v > belongs to E (G), u appears before v in the linear sequence. Generally, such a linear sequence is referred to as a sequence satisfying a topological order, abbreviated as a topological sequence. Briefly, a partial order on a set results in a full order on the set, which is called topological ordering.
And step S103, calling functional objects according to the interface information in sequence based on the direction of the directed logic relationship.
The calling of the function object according to the interface information comprises the following steps:
step S103-1, acquiring function object calling information, process characteristic information, calling thread pool type and calling thread characteristic information of the interface information.
And step S103-2, acquiring the calling thread according to the process characteristic information, the calling thread pool type and the calling thread characteristic information.
Each thread has an exclusive dynamic feature information, but the dynamic feature information is dynamically allocated when the process is established and cannot be pre-specified, so that the embodiment of the disclosure classifies the calling threads with different functions and purposes by using the calling thread pool type, creates a corresponding number of threads according to the calling thread feature information under each calling thread pool type in the interface information when the process is established, and establishes a corresponding index relationship between the dynamic feature information of the thread and the calling thread feature information. And acquiring the corresponding calling thread through the index relation.
For example, the number of cores of the CPU is 8, and the number of pieces of calling thread feature information in the CPU-intensive type is 4, which are a01, a02, a03, and a04, respectively; when a process is established, 4 threads with the same quantity as the calling thread feature information are established, the dynamic feature information acquired by each thread is F201901, F201902, F201903 and F201904, and corresponding index relations are established by a simple corresponding method; namely, A01 for F201901, A02 for F201902, A03 for F201903, and A04 for F201904.
And step S103-3, calling the function object by using the calling thread and the function object calling information.
For example, the function object call information is description information of a function or a method, and the call thread acquires the call method through the description information of the function or the method, so that the function object can be called, that is, the call thread calls the function or the method.
According to the method and the device, the calling sequencing relation is established among the functional objects among the threads, so that the process can call the functional objects in sequence according to the sequencing relation, and the additional overhead of a system caused by mutual interference among the functional objects is avoided. The newly added functional object does not need to concern about the asynchronous problem, and can be added to the process according to the rule of the interface information, thereby simplifying the programming complexity. And the CPU kernel can process the calling thread in parallel under extreme conditions, so that the extra overhead caused by the occupation of the CPU time slice is avoided. Meanwhile, each functional object is conveniently monitored.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an apparatus for scheduling functional objects. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 illustrates an embodiment of an apparatus for scheduling a functional object according to the present disclosure. Fig. 2 is a block diagram of a unit of an apparatus for scheduling a functional object according to an embodiment of the present disclosure.
Referring to fig. 2, the present disclosure provides an apparatus for scheduling a functional object, including: the device comprises an acquisition unit 201, a building unit 202 and a calling unit 203.
An obtaining unit 201, configured to obtain interface information of a function object in the process;
an establishing unit 202, configured to establish a directed logical relationship between the functional objects according to the interface information and a directed ordering rule;
and the calling unit 203 is used for calling the functional objects in sequence according to the interface information based on the direction of the directed logical relationship.
Optionally, the interface information includes: the method comprises the following steps of calling information of the function objects, dependency relationship among the function objects, process characteristic information, calling thread pool types and calling thread characteristic information corresponding to the calling thread pool types.
Optionally, the establishing unit 202 includes:
and the dependency relationship-based subunit is used for establishing a directed logic relationship between the functional objects according to the dependency relationship between the functional objects and a directed sorting rule.
Optionally, the dependency relationship between the functional objects includes: a directed graph data structure of the functional object;
in the dependency relationship-based subunit, including:
and the directed graph data structure-based subunit is used for establishing a directed logic relationship between the functional objects according to the directed graph data structure and a directed sorting rule.
Optionally, the invoking unit 203 includes:
the thread information acquiring subunit is used for acquiring function object calling information, process characteristic information, calling thread pool type and calling thread characteristic information of the interface information;
the obtaining calling thread subunit is used for obtaining a calling thread according to the process characteristic information, the calling thread pool type and the calling thread characteristic information;
and the calling subunit is used for calling the functional object by using the calling thread and the functional object calling information.
Optionally, the calling thread pool type includes: a CPU intensive type and/or an IO intensive type;
the number of the calling threads of the CPU intensive type is less than or equal to the number of the cores of the CPU.
Optionally, the directed logical relationship includes: directed acyclic logical relationships;
the directed ordering rule comprises: topological ordering rules of directed graphs.
According to the method and the device, the calling sequencing relation is established among the functional objects among the threads, so that the process can call the functional objects in sequence according to the sequencing relation, and the additional overhead of a system caused by mutual interference among the functional objects is avoided. The newly added functional object does not need to concern about the asynchronous problem, and can be added to the process according to the rule of the interface information, thereby simplifying the programming complexity. And the CPU kernel can process the calling thread in parallel under extreme conditions, so that the extra overhead caused by the occupation of the CPU time slice is avoided. Meanwhile, each functional object is conveniently monitored.
The third embodiment of the present disclosure provides an electronic device, where the electronic device is used in a method for scheduling a functional object, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of scheduling functional objects according to the first embodiment.
The present disclosure provides a fourth embodiment, which is a computer storage medium storing computer-executable instructions that can execute the method for scheduling functional objects as described in the first embodiment.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above 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 a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (7)

1. A method for scheduling functional objects, comprising:
acquiring interface information of a functional object in the process, wherein the functional object refers to a segment of program capable of completing an independent function in one thread, and the interface information includes: the method comprises the following steps that functional object calling information, dependency among functional objects, process feature information, calling thread pool types and calling thread feature information corresponding to the calling thread pool types are obtained, the dependency among the functional objects comprises a directed graph data structure of the functional objects, the directed graph data structure comprises ordered triples, and the ordered triples comprise association functions and an ordered element pair related to the association functions;
establishing a directed logic relationship between the functional objects according to the directed graph data structure and a directed sorting rule;
and calling functional objects in sequence according to the interface information based on the direction of the directed logic relationship.
2. The method of claim 1, wherein said invoking a function object according to said interface information comprises:
acquiring function object calling information, process characteristic information, calling thread pool type and calling thread characteristic information of the interface information;
acquiring a calling thread according to the process characteristic information, the calling thread pool type and the calling thread characteristic information;
and calling the function object by using the calling thread and the function object calling information.
3. The method of any of claims 1 and 2, wherein the invoking thread pool type comprises: a CPU intensive type and/or an IO intensive type;
the number of the calling threads of the CPU intensive type is less than or equal to the number of the cores of the CPU.
4. The method according to any of claims 1 and 2, wherein the directed logical relationship comprises: directed acyclic logical relationships;
the directed ordering rule comprises: topological ordering rules of directed graphs.
5. An apparatus for scheduling functional objects, comprising:
an obtaining unit, configured to obtain interface information of a function object in the process, where the function object refers to a segment of a program that can complete an independent function in one thread, and the interface information includes: the method comprises the following steps that functional object calling information, dependency among functional objects, process feature information, calling thread pool types and calling thread feature information corresponding to the calling thread pool types are obtained, the dependency among the functional objects comprises a directed graph data structure of the functional objects, the directed graph data structure comprises ordered triples, and the ordered triples comprise association functions and an ordered element pair related to the association functions;
the establishing unit is used for establishing a directed logic relationship between the functional objects according to the directed graph data structure and the directed sorting rule;
and the calling unit is used for calling the functional objects in sequence according to the interface information based on the direction of the directed logic relationship.
6. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 4.
CN201910715763.7A 2019-08-05 2019-08-05 Method, device, medium and electronic equipment for scheduling functional objects Active CN110489219B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910715763.7A CN110489219B (en) 2019-08-05 2019-08-05 Method, device, medium and electronic equipment for scheduling functional objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910715763.7A CN110489219B (en) 2019-08-05 2019-08-05 Method, device, medium and electronic equipment for scheduling functional objects

Publications (2)

Publication Number Publication Date
CN110489219A CN110489219A (en) 2019-11-22
CN110489219B true CN110489219B (en) 2022-05-03

Family

ID=68549402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910715763.7A Active CN110489219B (en) 2019-08-05 2019-08-05 Method, device, medium and electronic equipment for scheduling functional objects

Country Status (1)

Country Link
CN (1) CN110489219B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419795B (en) * 2021-07-21 2022-05-03 网易(杭州)网络有限公司 Call relation display method and device, computer equipment and storage medium
CN114546628B (en) * 2022-04-22 2022-07-29 北京奥星贝斯科技有限公司 Thread processing method, thread management method, thread processing device, thread management device and equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8230144B1 (en) * 2004-10-19 2012-07-24 Broadcom Corporation High speed multi-threaded reduced instruction set computer (RISC) processor
US9582312B1 (en) * 2015-02-04 2017-02-28 Amazon Technologies, Inc. Execution context trace for asynchronous tasks
CN106605209A (en) * 2014-09-02 2017-04-26 起元科技有限公司 Controlling data processing tasks
CN106844017A (en) * 2015-12-03 2017-06-13 阿里巴巴集团控股有限公司 The method and apparatus that event is processed for Website server
CN109144498A (en) * 2018-07-16 2019-01-04 山东师范大学 A kind of the API auto recommending method and device of object-oriented instantiation task
CN109636304A (en) * 2018-10-29 2019-04-16 浙江口碑网络技术有限公司 Dissemination method and device, storage medium, the electronic device of operation system
CN109753358A (en) * 2018-12-26 2019-05-14 新华三技术有限公司合肥分公司 task processing method and device
CN109783158A (en) * 2019-01-14 2019-05-21 深圳市脸萌科技有限公司 Using starting task processing method and device
CN109814986A (en) * 2017-11-20 2019-05-28 上海寒武纪信息科技有限公司 Task method for parallel processing, storage medium, computer equipment, device and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7526771B2 (en) * 2003-11-12 2009-04-28 Ntt Docomo, Inc. Method and apparatus for configuring an application while the application is running
US7278133B2 (en) * 2004-07-23 2007-10-02 Ntt Docomo, Inc. Index-based parameter access and software for using the same
US20060150188A1 (en) * 2004-12-21 2006-07-06 Manuel Roman Method and apparatus for supporting soft real-time behavior
US20090313600A1 (en) * 2008-06-13 2009-12-17 Microsoft Corporation Concurrent code generation
US8473524B2 (en) * 2009-04-28 2013-06-25 Dassault Systemes Method and system for updating object data with respect to object specifications in a product life cycle management system
WO2014083672A1 (en) * 2012-11-30 2014-06-05 株式会社日立製作所 Management device, management method, and recording medium for storing program
US10776147B2 (en) * 2018-01-29 2020-09-15 Salesforce.Com, Inc. Orchestration engine for migrating application data and application services using migration steps in migration component

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8230144B1 (en) * 2004-10-19 2012-07-24 Broadcom Corporation High speed multi-threaded reduced instruction set computer (RISC) processor
CN106605209A (en) * 2014-09-02 2017-04-26 起元科技有限公司 Controlling data processing tasks
US9582312B1 (en) * 2015-02-04 2017-02-28 Amazon Technologies, Inc. Execution context trace for asynchronous tasks
CN106844017A (en) * 2015-12-03 2017-06-13 阿里巴巴集团控股有限公司 The method and apparatus that event is processed for Website server
CN109814986A (en) * 2017-11-20 2019-05-28 上海寒武纪信息科技有限公司 Task method for parallel processing, storage medium, computer equipment, device and system
CN109144498A (en) * 2018-07-16 2019-01-04 山东师范大学 A kind of the API auto recommending method and device of object-oriented instantiation task
CN109636304A (en) * 2018-10-29 2019-04-16 浙江口碑网络技术有限公司 Dissemination method and device, storage medium, the electronic device of operation system
CN109753358A (en) * 2018-12-26 2019-05-14 新华三技术有限公司合肥分公司 task processing method and device
CN109783158A (en) * 2019-01-14 2019-05-21 深圳市脸萌科技有限公司 Using starting task processing method and device

Also Published As

Publication number Publication date
CN110489219A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN109523187B (en) Task scheduling method, device and equipment
CN111240834B (en) Task execution method, device, electronic equipment and storage medium
CN111581555B (en) Document loading method, device, equipment and storage medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN110489219B (en) Method, device, medium and electronic equipment for scheduling functional objects
CN114035879A (en) Page theme color changing method and device, electronic equipment and computer readable medium
CN113760991A (en) Data operation method and device, electronic equipment and computer readable medium
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
CN115357350A (en) Task configuration method and device, electronic equipment and computer readable medium
CN113835992A (en) Memory leak processing method and device, electronic equipment and computer storage medium
CN113419841B (en) Message scheduling method and device, electronic equipment and computer readable medium
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN111352872A (en) Execution engine, data processing method, apparatus, electronic device, and medium
CN111324387A (en) Application task control method, device, terminal and system
CN116302271A (en) Page display method and device and electronic equipment
CN113792869B (en) Video processing method and device based on neural network chip and electronic equipment
CN113518183A (en) Camera calling method and device and electronic equipment
CN110941683B (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN111538717A (en) Data processing method and device, electronic equipment and computer readable medium
CN111756833A (en) Node processing method and device, electronic equipment and computer readable medium
CN114651237A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN116755889B (en) Data acceleration method, device and equipment applied to server cluster data interaction
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN112346728B (en) Device adaptation method, apparatus, device and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.