WO2022148086A1 - Information processing method and apparatus, and device and storage medium - Google Patents

Information processing method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2022148086A1
WO2022148086A1 PCT/CN2021/124356 CN2021124356W WO2022148086A1 WO 2022148086 A1 WO2022148086 A1 WO 2022148086A1 CN 2021124356 W CN2021124356 W CN 2021124356W WO 2022148086 A1 WO2022148086 A1 WO 2022148086A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
target program
program
running
resources
Prior art date
Application number
PCT/CN2021/124356
Other languages
French (fr)
Chinese (zh)
Inventor
田宇
Original Assignee
田宇
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 田宇 filed Critical 田宇
Publication of WO2022148086A1 publication Critical patent/WO2022148086A1/en

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/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present application relates to the technical field of information processing, and more particularly, to an information processing method, apparatus, device, and storage medium.
  • the purpose of this application is to provide an information processing method, apparatus, device and storage medium to at least partially overcome the technical problems existing in the prior art.
  • An information processing method comprising:
  • the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
  • the resource allocation logic allocates the resources required by the first node to the target program.
  • the prediction information corresponding to the first node is obtained in the following manner:
  • the first node is the first node according to the preset resource allocation logic based on the parameters passed to the first node in history. Allocate resources as forecast information.
  • searching for the historical sub-running trajectory with the greatest similarity to the sub-running trajectory corresponding to the second node includes:
  • the parameter passed to the first node matches the historical parameter passed to the first node, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the threshold, the The reference count corresponding to the first node is incremented by 1;
  • the reference count corresponding to the first node is decremented by 1.
  • the above method preferably, also includes:
  • the prediction information corresponding to the third node determines whether the prediction information corresponding to the third node is mapped to the third node.
  • the above method preferably, also includes:
  • the resource planning file Acquiring a resource planning file configured by the user, the resource planning file recording the priority of resources used by multiple specified programs and/or the usage amount of resources;
  • the resource planning file is used to adjust the amount of resources allocated to the plurality of specified programs according to the priorities of the plurality of specified programs and/or the usage of resources.
  • the above method preferably, also includes:
  • the non-standard associated program is determined as a malicious program.
  • An electronic device including a memory and a processor
  • the memory is used to store programs
  • the processor is configured to execute the program stored in the memory to implement each step of the information processing method described in any one of the above.
  • a computer-readable storage medium on which a program is stored characterized in that, when the program is executed by a processor, each step of the information processing method described in any one of the above is implemented.
  • the information processing method, device, device and storage medium provided by the present application record the actual running track of the target program after the target program runs; obtain the resource application issued when the target program runs the first node; the first node is the target program in the target program. Any node; in response to the resource application, obtain the prediction information corresponding to the first node, and the prediction information carries the parameters passed into the first node in history; if the parameters passed into the first node and the parameters passed into the first node in history If there is a match, the resources pre-allocated for the first node are allocated to the target program; otherwise, resources required by the first node are allocated to the target program according to the pre-set resource allocation logic.
  • the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation logic , and the preset resource allocation logic is usually more complex, there are many factors to be considered, and it takes a certain amount of time to allocate resources. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the performance of the target program. The execution efficiency of the target program.
  • Fig. 1 is a kind of realization flow chart of the information processing method provided by the embodiment of this application;
  • Fig. 2 is a kind of realization flow chart of finding the historical sub-running trajectory with the greatest similarity of the sub-running trajectory corresponding to the second node in the historical running trajectory of the target program provided by the embodiment of the present application;
  • FIG. 3 is a schematic structural diagram of an information processing apparatus provided by an embodiment of the present application.
  • FIG. 4 is a block diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • the information processing methods provided in the embodiments of the present application can be applied to electronic devices, and the electronic devices can be mobile communication terminals, such as smart phones, tablet computers, etc., and the electronic devices can also be personal computers, such as desktop computers, all-in-one computers, Laptop etc.
  • FIG. 1 An implementation flow chart of the information processing method provided by the present application is shown in Figure 1, and may include:
  • Step S101 run the target program, and record the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node.
  • the parameters passed to each node represent the resources required by the node and the amount of resources. Since the resource required by the node may be a resource that cannot be quantified, when the resource is a resource that cannot be quantified, the resource amount may be set to a preset value, such as 0.
  • the target program can be any program in the electronic device, for example, it can be an application program, or it can be a kernel program, or it can be a driver program or the like.
  • the nodes of the target program may include: functions, calling interfaces (Application Program Interface, API), program binary interfaces (Application Binary Interface, ABI), conditional branches or specified program fragments and other objects that need to apply for resources, the first node may be the above Any of several types of nodes.
  • the resources described in the embodiments of the present application may be system resources, may include resources of types such as memory, programs, and hardware, and may specifically include but are not limited to at least one of the following: resources used for computing, resources used for interrupt processing , resources for implementing synchronization functions, resources for memory management, resources for allocating address space, resources for file access, resources for device access, resources for managing time and timers, for Resources for page table processing, resources for handling exceptions (terminations, traps, errors, etc.), resources for implementing program scheduling and other system functions that directly or indirectly affect running continuity, resources for implementing signal processing, using resources for system calls, resources for communication, etc.
  • Step S102 Acquire a resource application issued when the target program runs the first node; the first node is any node in the target program.
  • the resource application may be a resource application automatically generated according to its own running logic during the running of the target program, or may be a resource application generated in response to a user's operation.
  • Step S103 In response to the above resource application, obtain prediction information corresponding to the first node.
  • the prediction information carries the resources pre-allocated for the first node and the parameters passed into the first node in history. If the parameter matches the parameter passed to the first node in the history, step S104 is executed; otherwise, the resource required by the first node is allocated to the target program according to the preset resource allocation logic.
  • the following method can be used to determine whether the parameters passed to the first node match the parameters passed to the first node in history:
  • the resource requested by the first node are the same as the resources historically requested by the first node, and the difference between the amount of resources requested by the first node and the amount of resources historically requested by the first node is within the preset range, determine The parameter matches the parameter passed into the first node in history, otherwise, it is determined that the parameter passed into the first node does not match the parameter passed into the first node in history.
  • Step S104 Allocate the resource pre-allocated for the first node to the target program.
  • the resources required by the first node of the target program are allocated in advance, and when the target program actually runs to the second node, a sub-running trajectory corresponding to the second node can be obtained, and the sub-running trajectory includes N Nodes, respectively the second node and the N-1 nodes running before the second node, find the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the second node in the historical running trajectory of the target program; if The node running after the historical sub-running track in the historical running track is the first node.
  • the first node of the target program is allocated the required resources according to the preset resource allocation logic, that is, , the resource represented by the parameter passed into the first node in the history is used as the resource to be applied for by the first node, and the resource is allocated to the first node in advance according to the preset resource allocation logic.
  • the preset resource allocation logic may be a relatively mature resource allocation logic in the prior art, for example, resources are allocated to nodes according to real-time usage of system resources and program priorities. The specific implementation manner is not the focus of the present application, and will not be described in detail here.
  • the fourth node of the target program will be the fourth node of the target program based on the parameters passed to the fourth node based on the history and the preset resource allocation logic. Allocate the required resources, that is, the resources represented by the parameters historically passed to the fourth node are used as the resources to be applied for by the fourth node, and resources are allocated to the fourth node in advance according to the preset resource allocation logic.
  • the simulated running trajectory of the target program can be automatically generated, and the simulated running trajectory can be used as the historical running trajectory.
  • the simulated running trajectory of the target program is not a trajectory generated by running the target program, but is based on the relationship of each node marked by the developer of the target program, the frequency of use of the node, and the parameters or parameter values that each node may pass in.
  • the range of running trajectories that may be generated by the target program generated by the simulation, the simulated running trajectories can be pre-generated and stored in the server, before the target program runs for the first time (for example, when the electronic equipment is powered on for the first time after leaving the factory) or the historical running trajectories are damaged , the simulation running track can be downloaded from the server.
  • the trajectory prediction of the target program is performed by simulating the running trajectory to prevent the target program from running for the first time or when the historical running trajectory is damaged.
  • the timing position of the first node is located after the second node, that is to say, based on the actual running trajectory of the target program, the first node will be executed after the second node is executed. Specifically, it may be the first node that is executed after the second node is executed.
  • the prediction information corresponding to the first node is not obtained, it means that resources are not allocated to the first node in advance, or, although the prediction information corresponding to the first node is obtained, the parameters and history passed to the first node are passed into the first node.
  • the parameters of the nodes do not match, indicating that the prediction information corresponding to the first node does not match the actual usage of the user.
  • the target program needs to be allocated the resources required by the first node in real time according to the preset resource allocation logic.
  • the target program runs, the actual running track of the target program is recorded; the resource application sent when the target program runs the first node is obtained; the first node is any node in the target program; For resource application, obtain the prediction information corresponding to the first node.
  • the prediction information carries the resources pre-allocated for the first node and the parameters passed into the first node in history; if the parameters passed into the first node and the history passed in The parameters of the first node match, and the resources pre-allocated for the first node match the resources applied for by the first node, and the resources pre-allocated for the first node are allocated to the target program; otherwise, the target program is allocated according to the preset resource allocation logic The program allocates the resources needed by the first node.
  • the target program Since the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation
  • resource allocation logic is usually more complex, and there are many factors to be considered. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the execution efficiency of the target program.
  • FIG. 2 an implementation flow chart of finding the historical sub-trajectory with the greatest similarity to the sub-running trajectory corresponding to the second node in the historical running trajectory of the target program is shown in FIG. 2 , which may include: :
  • Step S201 Convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node.
  • the above-mentioned preset data structure may be a matrix, or may be other structures, for example, may be a linear structure.
  • the nodes can be sequentially written into an empty matrix of preset size to form a data block. Each node corresponds to an element in the data block. If a matrix cannot be filled with nodes, the The position where the data corresponding to the node is not filled in the matrix is filled with the preset value.
  • the sub-trajectory corresponding to the second node is converted into a data block of 8 ⁇ 8 size. If the number of nodes in the sub-trajectory corresponding to the second node is less than 64, the data corresponding to the node that is not filled in the matrix is filled in the pre- set value.
  • Each element in the data block stores data corresponding to a node
  • the data corresponding to a node may include, but is not limited to, at least part of the following data: the address of the node (which can be a physical address, a virtual address, or an IO address), the node In the time sequence position in the running track, the resource and resource amount requested by the node, as well as the parameters and parameter values passed in by the node.
  • Step S202 Calculate the similarity between the data unit transferred from the sub-running trajectory corresponding to the second node and each historical data unit in the historical running trajectory, respectively.
  • each data block can be regarded as a frame of image, and the similarity between two data blocks can be calculated by using the method of calculating image similarity.
  • the Euclidean distance between two data blocks is calculated, and the Euclidean distance is used to represent the similarity between the two image blocks. The smaller the Euclidean distance, the higher the similarity.
  • Step S203 Obtain the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
  • the reference count corresponding to the first node is added to 1.
  • the reference technology corresponding to the first node is incremented by 1.
  • the reference count represents the frequency of the sub-running program corresponding to the first node being used by the user, and the larger the reference count, the higher the frequency of the sub-running program corresponding to the first node being used by the user.
  • the reference count corresponding to the first node is decremented by 1.
  • the parameters passed to the first node match the parameters passed to the first node in history, but the similarity between the historical sub-trajectories and the sub-trajectories corresponding to the second node is less than or equal to the threshold, or, the parameters passed to the first node If it does not match the parameters passed to the first node in history, it means that the running trajectory of the target program is not accurately predicted. In this case, the reference count corresponding to the first node is decremented by 1.
  • the information processing method provided in this embodiment of the present application may further include:
  • the prediction information corresponding to the third node is determined, and at least a part of the program segment of the second node is executed; the prediction information corresponding to the third node carries the resources allocated for the third node and the parameters historically transmitted to the third node.
  • the third node of the target program is a human-computer interaction program
  • the user provides the interaction data required for human-computer interaction in advance
  • all program fragments of the third node of the target program can be executed.
  • the third node is a human-computer interaction type program, and the user does not provide interaction data required for human-computer interaction in advance, then the program fragment of the initialization part of the third node of the target program can be executed.
  • the third node is a node adjacent to the first node and located after the first node.
  • the node that needs to be run after the first node can be predicted according to the sub-prediction trajectory corresponding to the first node. If the predicted node is the second node, it can be run in advance.
  • the second node can reduce the startup time of the second node and further improve the execution efficiency of the target program when the operation of the first node ends.
  • the second node is not executed after the first node is executed, indicating that the actual running trajectory of the target program deviates from the predicted trajectory of the target program, the execution of at least part of the program segments of the second node is terminated to avoid unnecessary programs. Fragment execution results in a waste of resources.
  • the information processing method provided in this embodiment of the present application may further include:
  • the user may provide a resource planning file to the operating system of the electronic device, so that the operating system can learn the resource planning requirements of the user for each specified program, and the resource planning requirements record the resource planning requirements of multiple specified programs. Priority and/or resource usage.
  • the resource planning file only records the priority of resources used by multiple specified programs, in the case of resource shortage, when allocating resources to multiple specified programs is involved, the operating system records the priority of each specified program according to the resource planning file. The program with higher priority allocates resources first.
  • the resource planning file only records the usage of resources used by multiple specified programs, when resources need to be allocated to any one of the multiple specified programs, the operating system records the resource usage of each specified program according to the resource planning file as the specified program. Programs allocate resources.
  • the resource planning file records not only the priority of resources used by multiple designated programs, but also the usage of resources used by multiple designated programs, in the case of resource shortage, when it comes to allocating resources to multiple designated programs.
  • the operating system allocates resources preferentially to programs with higher priorities according to the priorities of each designated program recorded in the resource planning file, and the amount of resources allocated is the amount of resource usage recorded in the planning file.
  • the user may provide a resource rule file to the operating system through a visual resource configuration interface provided by the operating system, so that the user can adjust the resources allocated by the operating system to the program at any time.
  • the resource usage of the operating system can be displayed in real time on the visual resource configuration interface, so that the user can monitor the resource usage of the operating system in real time through the visual resource configuration interface.
  • the running track of the program can also be displayed on the visual resource configuration interface.
  • the user can specify the usage of resources by any program.
  • the operating system can adjust the resources allocated to each program according to the user's wishes, thereby ensuring that the user needs The program executes quickly and stably.
  • the information processing method provided in this embodiment of the present application may further include:
  • the actual associated program of the target program is determined according to the actual running track of the target program.
  • the target program In the actual running process of the target program, it may interact with programs other than the target program, and these programs other than the target program are called associated programs of the target program.
  • the associated programs that the target program can interact with during the running process are pre-defined when the target program is published. Therefore, the standard associated programs corresponding to the target program are known.
  • the non-standard associated program is determined as a malicious program.
  • the actual associated program of the target program includes a non-standard associated program, it means that the actual associated program of the target program includes an associated program that does not belong to the standard associated program corresponding to the target program, and the associated program is a malicious program (plug-in or Trojan horse, etc.).
  • prompt information can also be output to notify the user that there is a malicious program.
  • the actual running track of the malicious program can also be recorded, and then the malicious behavior of the malicious program can be determined according to the actual running track of the malicious program.
  • a link instruction triggered by the user can be obtained, and in response to the link instruction, some or all of the dynamic link library files selected by the user are linked into the target program. program, using the linked target program as a copy of the target program.
  • the aforementioned running target program may be a copy of the running target program, and by running the copy of the target program, a time-consuming dynamic linking process can be avoided, thereby speeding up the running speed of the target program.
  • the information processing method provided by the embodiment of the present application is applied to an electronic device, and the information processing method provided by the embodiment of the present application may further include:
  • the actual running track of the electronic device is recorded, and the actual running track of the electronic device records each program that has been run in the electronic device, the running sequence of each program, and the adjacent start running time. Interval between programs to start running time.
  • the prediction information corresponding to the first program is obtained, and the prediction information corresponding to the first program includes: a prediction interval, where the prediction interval is the time between the start time of the second program and the first program. The interval of the start run time.
  • the sub-running track corresponding to the first program can be obtained, and the sub-running track corresponding to the first program includes the first program and M-1 programs that run before the first program; the historical running track of the electronic device Find the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the first program in the The program is the second program, and the interval between the second program and the first program after the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the first program in the historical running trajectories of the electronic device is used as the prediction interval.
  • the second program is started and run in the background, and after the first program runs the prediction interval, the second program is transferred to the foreground to run.
  • the target program can be run in advance to further improve the running efficiency of the target program.
  • FIG. 3 A schematic structural diagram of the information processing apparatus provided by the embodiment of the present application is shown in FIG. 3 , which may include:
  • Operation module 301 resource application acquisition module 302, comparison module 303 and allocation module 304; wherein,
  • the running module 301 is used to run the target program and record the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
  • the resource application acquisition module 302 is configured to acquire the resource application sent by the target program when running the first node; the first node is any node in the target program;
  • the comparison module 303 is configured to, in response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
  • the allocation module 304 is configured to allocate the resource pre-allocated for the first node to the target program if the parameter passed to the first node matches the parameter passed to the first node in the history; Otherwise, resources required by the first node are allocated to the target program according to preset resource allocation logic.
  • the information processing device records the actual running track of the target program after the target program runs; obtains the resource application sent when the target program runs the first node; the first node is any node in the target program; and responds In the resource application, the prediction information corresponding to the first node is obtained, and the prediction information carries the parameters passed into the first node in history; if the parameters passed into the first node match the parameters passed into the first node in history, it will be preset as The resources allocated by the first node are allocated to the target program; otherwise, resources required by the first node are allocated to the target program according to preset resource allocation logic.
  • the target program Since the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation
  • resource allocation logic is usually more complex, and there are many factors to be considered. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the execution efficiency of the target program.
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • a sub-running trajectory acquisition module configured to acquire a sub-running trajectory corresponding to the second node when running the second node of the target program, the sub-running trajectory including the second node and the second node in the second N-1 nodes running before the node;
  • a search module is used to search the historical sub-running track with the greatest similarity of the sub-running track corresponding to the second node in the historical running track of the target program;
  • the prediction module is used for if the node running after the historical sub-running track in the historical running track is the first node, based on the parameters passed into the first node based on history, according to the preset resource allocation logic: The first node allocates resources as prediction information.
  • the search module includes:
  • a conversion unit configured to convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node;
  • a calculation unit used for calculating the similarity between the data unit and each historical data unit in the historical running track
  • An acquiring unit configured to acquire the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
  • the information processing apparatus may further include: a counting module, configured to: if the parameters passed into the first node and the history parameters passed into the first node match, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the threshold, add 1 to the reference count corresponding to the first node; if the parameter passed to the first node is the same as The parameters passed into the history of the first node match, but the similarity between the historical sub-running trajectory and the sub-running trajectory corresponding to the second node is less than or equal to the threshold, or, the information passed to the first node. If the parameter does not match the parameter passed into the first node from the history, the reference count corresponding to the first node is decremented by 1.
  • a counting module configured to: if the parameters passed into the first node and the history parameters passed into the first node match, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • a pre-execution module configured to execute at least part of the program segment of the second node after predicting a third node that runs after the first node, and after determining the prediction information corresponding to the third node; the third node
  • the corresponding prediction information carries the resources allocated to the third node and the parameters historically transmitted to the third node.
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • a resource planning module configured to obtain a resource planning file configured by a user, the resource planning file records the priority of resources used by multiple specified programs and/or the usage amount of the resources; the resource planning file is used for according to the multiple The priority of the designated programs and/or the amount of resource usage adjusts the amount of resources allocated to the plurality of designated programs.
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • a malicious program detection module configured to determine the actual associated program of the target program according to the actual running track of the target program; compare the actual associated program of the target program with the standard associated program corresponding to the target program; if the The actual associated programs of the target program include non-standard associated programs, and the non-standard associated programs are determined to be malicious programs.
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • the dynamic link module is used to obtain the link instruction triggered by the user, and in response to the link instruction, link part or all of the dynamic link library files selected by the user into the target program, and use the linked target program as a copy of the target program.
  • the running module 301 is specifically configured to run the copy of the target program.
  • the information processing apparatus provided in this embodiment of the present application may further include:
  • the program pre-running module is used to record the actual running track of the electronic device after the electronic device starts to run, and the actual running track of the electronic device records each program that has been run in the electronic device, and the running sequence of each program. , and the interval between the start-run times of programs adjacent to the start-run times.
  • the prediction information corresponding to the first program is obtained, and the prediction information corresponding to the first program includes: a prediction interval, where the prediction interval is the time between the start time of the second program and the first program. The interval of the start run time.
  • the second program is started and run in the background, and after the first program runs the prediction interval, the second program is transferred to the foreground to run.
  • the target program can be run in advance to further improve the running efficiency of the target program.
  • FIG. 4 shows a block diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • the hardware structure of the electronic device may include:
  • At least one processor 1 at least one communication interface 2 , at least one memory 3 and at least one communication bus 4 .
  • the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete the communication with each other through the communication bus 4;
  • the processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
  • the memory 3 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
  • the memory stores a program
  • the processor can call the program stored in the memory, and the program is used for:
  • the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
  • the resource allocation logic allocates the resources required by the first node to the target program.
  • refinement function and extension function of the program may refer to the above description.
  • An embodiment of the present application further provides a storage medium, where the storage medium can store a program suitable for the processor to execute, and the program is used for:
  • the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
  • the resource allocation logic allocates the resources required by the first node to the target program.
  • refinement function and extension function of the program may refer to the above description.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are an information processing method and apparatus, and a device and a storage medium. The method comprises: after a target program is run, recording an actual running trajectory of the target program; acquiring a resource application sent when the target program runs a first node, wherein the first node is any one node in the target program; in response to the resource application, acquiring prediction information corresponding to the first node, wherein the prediction information carries a parameter historically transmitted into the first node; and if a parameter transmitted into the first node matches the parameter historically transmitted into the first node, allocating, to the target program, a resource allocated to the first node in advance, otherwise, according to preset resource allocation logic, allocating, to the target program, a resource required by the first node. By means of the present application, the execution efficiency of a target program is improved.

Description

信息处理方法、装置、设备及存储介质Information processing method, apparatus, equipment and storage medium
本申请要求于2021年01月05日提交中国专利局、申请号为202110006858.9、发明名称为“信息处理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110006858.9 and the invention title "Information Processing Method, Apparatus, Equipment and Storage Medium" filed with the China Patent Office on January 5, 2021, the entire contents of which are incorporated by reference in in this application.
技术领域technical field
本申请涉及信息处理技术领域,更具体地说,涉及一种信息处理方法、装置、设备及存储介质。The present application relates to the technical field of information processing, and more particularly, to an information processing method, apparatus, device, and storage medium.
背景技术Background technique
目前,计算机、智能终端(智能手机、平板电脑等)等电子设备的硬件性能在日益稳步提升,而电子设备内应用程序的执行效率却未能随着硬件性能的提升而得到大幅度提高。At present, the hardware performance of electronic devices such as computers and smart terminals (smart phones, tablet computers, etc.) is steadily improving day by day, but the execution efficiency of applications in electronic devices has not been greatly improved with the improvement of hardware performance.
因此,如何提升应用程序的执行效率成为亟待解决的技术问题。Therefore, how to improve the execution efficiency of the application has become an urgent technical problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请的目的是提供一种信息处理方法、装置、设备及存储介质,以至少部分的克服现有技术中存在的技术问题。The purpose of this application is to provide an information processing method, apparatus, device and storage medium to at least partially overcome the technical problems existing in the prior art.
为实现上述目的,本申请提供了如下技术方案:To achieve the above purpose, the application provides the following technical solutions:
一种信息处理方法,包括:An information processing method, comprising:
运行目标程序,并记录所述目标程序的实际运行轨迹;所述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;Running the target program, and recording the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;Obtain the resource application sent when the target program runs the first node; the first node is any node in the target program;
响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有历史传入所述第一节点的参数;In response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。If the parameters passed to the first node match the parameters passed to the first node in the history, allocate the resources pre-allocated for the first node to the target program; otherwise, according to the preset The resource allocation logic allocates the resources required by the first node to the target program.
上述方法,优选的,所述第一节点对应的预测信息通过如下方式获取:In the above method, preferably, the prediction information corresponding to the first node is obtained in the following manner:
在运行所述目标程序的第二节点时,获取与所述第二节点对应的子运行轨迹,所述子运行轨迹包括所述第二节点以及在所述第二节点之前运行的N-1个节点;When running the second node of the target program, obtain a sub-running trajectory corresponding to the second node, where the sub-running trajectory includes the second node and N-1 running before the second node node;
在所述目标程序的历史运行轨迹中查找与所述第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹;Searching for the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the second node in the historical running trajectory of the target program;
如果所述历史运行轨迹中位于所述历史子运行轨迹之后运行的节点为所述第一节点,基于历史传入所述第一节点的参数,根据预置的资源分配逻辑为所述第一节点分配资源作为预测信息。If the node running after the historical sub-running track in the historical running track is the first node, the first node is the first node according to the preset resource allocation logic based on the parameters passed to the first node in history. Allocate resources as forecast information.
上述方法,优选的,所述在所述目标程序的历史运行轨迹中查找与所述第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹,包括:In the above method, preferably, in the historical running trajectories of the target program, searching for the historical sub-running trajectory with the greatest similarity to the sub-running trajectory corresponding to the second node includes:
将所述第二节点对应的子运行轨迹转换为预设数据结构的数据单元;所述数据单元中的每个元素对应一个节点;Convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node;
分别计算所述数据单元与所述历史运行轨迹中的每一个历史数据单元的相似度;respectively calculating the similarity between the data unit and each historical data unit in the historical running track;
获取与所述数据单元的相似度最大的历史数据单元对应的历史子运行轨迹。Obtain the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
上述方法,优选的,在将所述第一节点所需的资源分配给所述目标程序后,还包括:The above method, preferably, after allocating the resources required by the first node to the target program, further comprising:
如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,且所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度大于阈值,将所述第一节点对应的引用计数加1;If the parameter passed to the first node matches the historical parameter passed to the first node, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the threshold, the The reference count corresponding to the first node is incremented by 1;
如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,但所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度小于或等于阈值,或者,传入所述第一节点的参数与所述历史传入所述第一节点的参数不匹配,将所述第一节点对应的引用计数减1。If the parameter passed to the first node matches the historical parameter passed to the first node, but the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is less than or equal to the threshold , or, if the parameter passed to the first node does not match the parameter passed to the first node in the history, the reference count corresponding to the first node is decremented by 1.
上述方法,优选的,还包括:The above method, preferably, also includes:
预测位于所述第一节点之后运行的第三节点;predicting a third node running after said first node;
确定所述第三节点对应的预测信息,并执行所述第二节点的至少部分程序片段;所述第三节点对应的预测信息中携带有为所述第三节点分配的资源,以 及历史传入所述第三节点的参数。Determine the prediction information corresponding to the third node, and execute at least part of the program segment of the second node; the prediction information corresponding to the third node carries the resources allocated for the third node, and the historical incoming parameters of the third node.
上述方法,优选的,还包括:The above method, preferably, also includes:
获取用户配置的资源规划文件,所述资源规划文件记录了多个指定程序使用资源的优先级和/或资源的使用量;Acquiring a resource planning file configured by the user, the resource planning file recording the priority of resources used by multiple specified programs and/or the usage amount of resources;
所述资源规划文件用于根据所述多个指定程序的优先级和/或资源的使用量调整为所述多个指定程序分配的资源量。The resource planning file is used to adjust the amount of resources allocated to the plurality of specified programs according to the priorities of the plurality of specified programs and/or the usage of resources.
上述方法,优选的,还包括:The above method, preferably, also includes:
根据所述目标程序的实际运行轨迹确定所述目标程序的实际关联程序;Determine the actual associated program of the target program according to the actual running track of the target program;
将所述目标程序的实际关联程序与所述目标程序对应的标准关联程序比较;comparing the actual associated program of the target program with the standard associated program corresponding to the target program;
若所述目标程序的实际关联程序中包括非标准关联程序,将所述非标准关联程序确定为恶意程序。If the actual associated program of the target program includes a non-standard associated program, the non-standard associated program is determined as a malicious program.
一种电子设备,包括存储器和处理器;An electronic device including a memory and a processor;
所述存储器用于存储程序;the memory is used to store programs;
所述处理器用于执行所述存储器中存储的程序,以实现如上任意一项所述的信息处理方法的各个步骤。The processor is configured to execute the program stored in the memory to implement each step of the information processing method described in any one of the above.
一种计算机可读存储介质,其上存储有程序,其特征在于,所述程序被处理器执行时,实现如上任意一项所述的信息处理方法的各个步骤。A computer-readable storage medium on which a program is stored, characterized in that, when the program is executed by a processor, each step of the information processing method described in any one of the above is implemented.
本申请提供的信息处理方法、装置、设备及存储介质,在目标程序运行后,记录目标程序的实际运行轨迹;获取目标程序运行第一节点时发出的资源申请;第一节点为目标程序中的任意一个节点;响应于资源申请,获取与第一节点对应的预测信息,预测信息中携带有历史传入第一节点的参数;如果传入第一节点的参数与历史传入第一节点的参数匹配,将预先为第一节点分配的资源分配给目标程序;否则,根据预置的资源分配逻辑为目标程序分配第一节点所需的资源。由于预先为目标程序分配了第一节点所需的资源,因此,当目标程序运行第一节点时,可以直接将第一节点所需的资源分配给第一节点,避免执行预置的资源分配逻辑,而预置的资源分配逻辑通常都比较复杂,需要考虑的因素比较多,进行资源分配需要耗费一定的时间,因而通过为目标程序提前分配资源可以减少目标程序等待资源分配的时间,从而提高了目标程序的执行效 率。The information processing method, device, device and storage medium provided by the present application record the actual running track of the target program after the target program runs; obtain the resource application issued when the target program runs the first node; the first node is the target program in the target program. Any node; in response to the resource application, obtain the prediction information corresponding to the first node, and the prediction information carries the parameters passed into the first node in history; if the parameters passed into the first node and the parameters passed into the first node in history If there is a match, the resources pre-allocated for the first node are allocated to the target program; otherwise, resources required by the first node are allocated to the target program according to the pre-set resource allocation logic. Since the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation logic , and the preset resource allocation logic is usually more complex, there are many factors to be considered, and it takes a certain amount of time to allocate resources. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the performance of the target program. The execution efficiency of the target program.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本申请实施例提供的信息处理方法的一种实现流程图;Fig. 1 is a kind of realization flow chart of the information processing method provided by the embodiment of this application;
图2为本申请实施例提供的目标程序的历史运行轨迹中查找与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹的一种实现流程图;Fig. 2 is a kind of realization flow chart of finding the historical sub-running trajectory with the greatest similarity of the sub-running trajectory corresponding to the second node in the historical running trajectory of the target program provided by the embodiment of the present application;
图3为本申请实施例提供的信息处理装置的一种结构示意图;FIG. 3 is a schematic structural diagram of an information processing apparatus provided by an embodiment of the present application;
图4为本申请实施例提供的电子设备的硬件结构框图。FIG. 4 is a block diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的部分,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示的以外的顺序实施。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims and the above-mentioned drawings are used to distinguish similar parts and not necessarily to describe a particular order or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated herein.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本申请实施例提供的信息处理方法可以应用于电子设备,该电子设备可以是移动通信终端,比如,智能手机,平板电脑等,该电子设备也可以是个人计算机,比如,台式计算机,一体机,笔记本电脑等。The information processing methods provided in the embodiments of the present application can be applied to electronic devices, and the electronic devices can be mobile communication terminals, such as smart phones, tablet computers, etc., and the electronic devices can also be personal computers, such as desktop computers, all-in-one computers, Laptop etc.
本申请提供的信息处理方法的一种实现流程图如图1所示,可以包括:An implementation flow chart of the information processing method provided by the present application is shown in Figure 1, and may include:
步骤S101:运行目标程序,并记录目标程序的实际运行轨迹;该实际运行轨迹包括目标程序已运行的各个节点的运行时序,以及传入各个节点的参数。Step S101 : run the target program, and record the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node.
本申请实施例中,目标程序每次运行,均记录目标程序的实际运行轨迹。In the embodiment of the present application, each time the target program runs, the actual running track of the target program is recorded.
传入每一个节点的参数表征该节点所需的资源,及资源量。由于节点所需的资源可能无法量化的资源,因此,在资源为无法量化的资源时,资源量可以设置为预设值,比如0。The parameters passed to each node represent the resources required by the node and the amount of resources. Since the resource required by the node may be a resource that cannot be quantified, when the resource is a resource that cannot be quantified, the resource amount may be set to a preset value, such as 0.
目标程序可以为电子设备中任意一程序,比如,可以是应用程序,或者,可以是内核程序,或者,可以是驱动程序等。The target program can be any program in the electronic device, for example, it can be an application program, or it can be a kernel program, or it can be a driver program or the like.
目标程序的节点可以包括:函数,调用接口(Application Program Interface,API),程序二进制接口(Application Binary Interface,ABI),条件分支或指定的程序片段等需要申请资源的对象,第一节点可以是上述几种节点中的任意一种节点。The nodes of the target program may include: functions, calling interfaces (Application Program Interface, API), program binary interfaces (Application Binary Interface, ABI), conditional branches or specified program fragments and other objects that need to apply for resources, the first node may be the above Any of several types of nodes.
本申请实施例中所述的资源可以是系统资源,可以包括内存、程序、以及硬件等类型的资源,具体可以包括但不限于以下至少一种:用于计算的资源,用于中断处理的资源,用于实现同步功能的资源,用于内存管理的资源,用于分配地址空间的资源,用于文件访问的资源,用于设备访问的资源,用于管理时间与定时器的资源,用于页表处理的资源,用于处理异常(终止、陷阱、错误等等)的资源,用于实现程序调度等直接或间接影响运行连续性的系统功能的资源,用于实现信号处理的资源,用于系统调用的资源,用于通信的资源等。The resources described in the embodiments of the present application may be system resources, may include resources of types such as memory, programs, and hardware, and may specifically include but are not limited to at least one of the following: resources used for computing, resources used for interrupt processing , resources for implementing synchronization functions, resources for memory management, resources for allocating address space, resources for file access, resources for device access, resources for managing time and timers, for Resources for page table processing, resources for handling exceptions (terminations, traps, errors, etc.), resources for implementing program scheduling and other system functions that directly or indirectly affect running continuity, resources for implementing signal processing, using resources for system calls, resources for communication, etc.
步骤S102:获取目标程序运行第一节点时发出的资源申请;第一节点为目标程序中的任意一个节点。Step S102: Acquire a resource application issued when the target program runs the first node; the first node is any node in the target program.
该资源申请可以是目标程序运行过程中,根据自身的运行逻辑自动生成的资源申请,也可以是响应于用户的操作而生成的资源申请。The resource application may be a resource application automatically generated according to its own running logic during the running of the target program, or may be a resource application generated in response to a user's operation.
步骤S103:响应于上述资源申请,获取与第一节点对应的预测信息,预测信息中携带有预先为第一节点分配的资源,以及历史传入第一节点的参数,如果传入第一节点的参数与历史传入第一节点的参数匹配,则执行步骤S104,否则,根据预置的资源分配逻辑为目标程序分配第一节点所需的资源。Step S103: In response to the above resource application, obtain prediction information corresponding to the first node. The prediction information carries the resources pre-allocated for the first node and the parameters passed into the first node in history. If the parameter matches the parameter passed to the first node in the history, step S104 is executed; otherwise, the resource required by the first node is allocated to the target program according to the preset resource allocation logic.
其中,可以通过如下方法确定传入第一节点的参数与历史传入第一节点的参数是否匹配:Among them, the following method can be used to determine whether the parameters passed to the first node match the parameters passed to the first node in history:
根据传入第一节点的参数确定第一节点请求的资源,以及资源量;Determine the resources requested by the first node and the amount of resources according to the parameters passed into the first node;
根据历史传入第一节点的参数确定第一节点历史请求的资源及资源量;Determine the resources and the amount of resources historically requested by the first node according to the parameters passed to the first node in history;
若第一节点请求的资源与第一节点历史请求的资源相同,且第一节点请求的资源量与第一节点历史请求的资源量的差值在预设范围内,确定传入第一节点的参数与历史传入第一节点的参数匹配,否则,确定传入第一节点的参数与历史传入第一节点的参数不匹配。If the resources requested by the first node are the same as the resources historically requested by the first node, and the difference between the amount of resources requested by the first node and the amount of resources historically requested by the first node is within the preset range, determine The parameter matches the parameter passed into the first node in history, otherwise, it is determined that the parameter passed into the first node does not match the parameter passed into the first node in history.
步骤S104:将预先为第一节点分配的资源分配给目标程序。Step S104: Allocate the resource pre-allocated for the first node to the target program.
本申请中,预先为目标程序的第一节点分配了其所需的资源,可以在目标程序实际运行到第二节点时,获取与第二节点对应的子运行轨迹,该子运行轨迹包括N个节点,分别为第二节点以及在第二节点之前运行的N-1个节点,在目标程序的历史运行轨迹中查找与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹;如果历史运行轨迹中位于历史子运行轨迹之后运行的节点为第一节点,基于历史传入第一节点的参数,根据预置的资源分配逻辑为目标程序的第一节点分配其所需的资源,即,以历史传入第一节点的参数表征的资源作为第一节点要申请的资源,根据预置的资源分配逻辑预先为第一节点分配资源。其中,预置的资源分配逻辑可以是现有技术中比较成熟的资源分配逻辑,比如,根据系统资源的实时使用情况以及程序的优先级为节点分配资源。具体实现方式不是本申请的关注重点,这里不再详述。In this application, the resources required by the first node of the target program are allocated in advance, and when the target program actually runs to the second node, a sub-running trajectory corresponding to the second node can be obtained, and the sub-running trajectory includes N Nodes, respectively the second node and the N-1 nodes running before the second node, find the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the second node in the historical running trajectory of the target program; if The node running after the historical sub-running track in the historical running track is the first node. Based on the parameters passed to the first node in the history, the first node of the target program is allocated the required resources according to the preset resource allocation logic, that is, , the resource represented by the parameter passed into the first node in the history is used as the resource to be applied for by the first node, and the resource is allocated to the first node in advance according to the preset resource allocation logic. The preset resource allocation logic may be a relatively mature resource allocation logic in the prior art, for example, resources are allocated to nodes according to real-time usage of system resources and program priorities. The specific implementation manner is not the focus of the present application, and will not be described in detail here.
如果历史运行轨迹中位于历史子运行轨迹之后运行的节点不是第一节点,而是第四节点,则基于历史传入第四节点的参数,根据预置的资源分配逻辑为目标程序的第四节点分配其所需的资源,即,以历史传入第四节点的参数表征的资源作为第四节点要申请的资源,根据预置的资源分配逻辑预先为第四节点分配资源。If the node running after the historical sub-running track in the historical running track is not the first node, but the fourth node, then the fourth node of the target program will be the fourth node of the target program based on the parameters passed to the fourth node based on the history and the preset resource allocation logic. Allocate the required resources, that is, the resources represented by the parameters historically passed to the fourth node are used as the resources to be applied for by the fourth node, and resources are allocated to the fourth node in advance according to the preset resource allocation logic.
如果目标程序的历史运行轨迹损坏(比如,大量数据丢失等)或者首次运行时没有历史运行轨迹,那么可以自动生成目标程序的模拟运行轨迹,将模拟运行轨迹作为历史运行轨迹。If the historical running trajectory of the target program is damaged (for example, a large amount of data is lost, etc.) or there is no historical running trajectory when it is first run, the simulated running trajectory of the target program can be automatically generated, and the simulated running trajectory can be used as the historical running trajectory.
目标程序的模拟运行轨迹并不是由目标程序运行而生成的轨迹,而是根据目标程序的开发人员标记的各个节点的关联关系、节点的使用频率、每个节点可能会传入的参数或者参数值的范围模拟生成的目标程序可能会产生的运行轨迹,该模拟运行轨迹可以预先生成并存储在服务器中,在目标程序首次运行前(比如,电子设备在出厂后首次开机时)或历史运行轨迹损坏时,可以从服 务器下载该模拟运行轨迹。The simulated running trajectory of the target program is not a trajectory generated by running the target program, but is based on the relationship of each node marked by the developer of the target program, the frequency of use of the node, and the parameters or parameter values that each node may pass in. The range of running trajectories that may be generated by the target program generated by the simulation, the simulated running trajectories can be pre-generated and stored in the server, before the target program runs for the first time (for example, when the electronic equipment is powered on for the first time after leaving the factory) or the historical running trajectories are damaged , the simulation running track can be downloaded from the server.
本申请实施例中,在目标应用程序首次运行前或历史运行轨迹损坏的情况下,通过模拟运行轨迹对目标程序的进行轨迹预测,防止目标程序首次运行或历史运行轨迹损坏时无法进行轨迹预测的情况。In the embodiment of the present application, before the target application program runs for the first time or when the historical running trajectory is damaged, the trajectory prediction of the target program is performed by simulating the running trajectory to prevent the target program from running for the first time or when the historical running trajectory is damaged. Happening.
其中,在目标程序的实际运行轨迹中,第一节点的时序位置位于第二节点之后,也就是说,基于目标程序的实际运行轨迹,第一节点是在第二节点执行完之后才会执行,具体可以是在执行完第二节点后即执行的第一节点。Among them, in the actual running trajectory of the target program, the timing position of the first node is located after the second node, that is to say, based on the actual running trajectory of the target program, the first node will be executed after the second node is executed. Specifically, it may be the first node that is executed after the second node is executed.
其中,如果传入第一节点的参数与历史传入第一节点的参数不匹配,则根据预置的资源分配逻辑为目标程序分配第一节点所需的资源。Wherein, if the parameters passed to the first node do not match the parameters passed to the first node in the history, resources required by the first node are allocated to the target program according to the preset resource allocation logic.
如果没有获取与第一节点对应的预测信息,说明没有预先为第一节点分配资源,或者,虽然获取到了与第一节点对应的预测信息,但传入第一节点的参数与历史传入第一节点的参数不匹配,说明与第一节点对应的预测信息与用户的实际使用情况不符,此时需要根据预置的资源分配逻辑实时为目标程序分配第一节点所需的资源。If the prediction information corresponding to the first node is not obtained, it means that resources are not allocated to the first node in advance, or, although the prediction information corresponding to the first node is obtained, the parameters and history passed to the first node are passed into the first node. The parameters of the nodes do not match, indicating that the prediction information corresponding to the first node does not match the actual usage of the user. In this case, the target program needs to be allocated the resources required by the first node in real time according to the preset resource allocation logic.
本申请实施例提供的信息处理方法,在目标程序运行后,记录目标程序的实际运行轨迹;获取目标程序运行第一节点时发出的资源申请;第一节点为目标程序中的任意一个节点;响应于资源申请,获取与第一节点对应的预测信息,预测信息中携带有预先为第一节点分配的资源,以及历史传入第一节点的参数;如果传入第一节点的参数与历史传入第一节点的参数匹配,且预先为第一节点分配的资源与第一节点申请的资源匹配,将预先为第一节点分配的资源分配给目标程序;否则,根据预置的资源分配逻辑为目标程序分配第一节点所需的资源。由于预先为目标程序的分配了第一节点所需的资源,因此,当目标程序运行第一节点时,可以直接将第一节点所需的资源分配给第一节点,避免执行预置的资源分配逻辑,而资源分配逻辑通常都比较复杂,需要考虑的因素比较多,因而通过为目标程序提前分配资源可以减少目标程序等待资源分配的时间,从而提高了目标程序的执行效率。In the information processing method provided by the embodiment of the present application, after the target program runs, the actual running track of the target program is recorded; the resource application sent when the target program runs the first node is obtained; the first node is any node in the target program; For resource application, obtain the prediction information corresponding to the first node. The prediction information carries the resources pre-allocated for the first node and the parameters passed into the first node in history; if the parameters passed into the first node and the history passed in The parameters of the first node match, and the resources pre-allocated for the first node match the resources applied for by the first node, and the resources pre-allocated for the first node are allocated to the target program; otherwise, the target program is allocated according to the preset resource allocation logic The program allocates the resources needed by the first node. Since the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation However, resource allocation logic is usually more complex, and there are many factors to be considered. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the execution efficiency of the target program.
在一可选的实施例中,在目标程序的历史运行轨迹中查找与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹的一种实现流程图如图2所示, 可以包括:In an optional embodiment, an implementation flow chart of finding the historical sub-trajectory with the greatest similarity to the sub-running trajectory corresponding to the second node in the historical running trajectory of the target program is shown in FIG. 2 , which may include: :
步骤S201:将第二节点对应的子运行轨迹转换为预设数据结构的数据单元;该数据单元中的每个元素对应一个节点。Step S201: Convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node.
上述预设数据结构可以是矩阵,也可以是其它结构,比如,可以是线性结构。The above-mentioned preset data structure may be a matrix, or may be other structures, for example, may be a linear structure.
如果预设数据结构为矩阵,可以将节点按照顺序依次写入预设大小的空矩阵中,形成数据块,每个节点对应数据块中的一个元素,若一个矩阵无法用节点填满,可以将矩阵未填写节点对应的数据的位置填写预置的数值。If the preset data structure is a matrix, the nodes can be sequentially written into an empty matrix of preset size to form a data block. Each node corresponds to an element in the data block. If a matrix cannot be filled with nodes, the The position where the data corresponding to the node is not filled in the matrix is filled with the preset value.
比如,将第二节点对应的子运行轨迹转换为8×8大小的数据块,如果第二节点对应的子运行轨迹中节点的数量小于64,则将矩阵未填写节点对应的数据的位置填写预置的数值。For example, the sub-trajectory corresponding to the second node is converted into a data block of 8 × 8 size. If the number of nodes in the sub-trajectory corresponding to the second node is less than 64, the data corresponding to the node that is not filled in the matrix is filled in the pre- set value.
数据块中的每个元素存储一个节点对应的数据,节点对应的数据可以包括但不限于以下几种数据中的至少部分数据:节点的地址(可以是物理地址、虚拟地址或IO地址),节点在运行轨迹中的时序位置,节点申请的资源和资源量,以及节点传入的参数和参数的取值。Each element in the data block stores data corresponding to a node, and the data corresponding to a node may include, but is not limited to, at least part of the following data: the address of the node (which can be a physical address, a virtual address, or an IO address), the node In the time sequence position in the running track, the resource and resource amount requested by the node, as well as the parameters and parameter values passed in by the node.
步骤S202:分别计算由第二节点对应的子运行轨迹转得到的数据单元与历史运行轨迹中的每一个历史数据单元的相似度。Step S202: Calculate the similarity between the data unit transferred from the sub-running trajectory corresponding to the second node and each historical data unit in the historical running trajectory, respectively.
以数据单元为数据块为例,可以将每个数据块看作一帧图像,利用计算图像相似度的方法计算两个数据块之间的相似度。比如,计算两个数据块之间的欧式距离,以该欧式距离来表征两个图像块之间的相似度,欧式距离越小,相似度越高。Taking the data unit as a data block as an example, each data block can be regarded as a frame of image, and the similarity between two data blocks can be calculated by using the method of calculating image similarity. For example, the Euclidean distance between two data blocks is calculated, and the Euclidean distance is used to represent the similarity between the two image blocks. The smaller the Euclidean distance, the higher the similarity.
步骤S203:获取与数据单元的相似度最大的历史数据单元对应的历史子运行轨迹。Step S203: Obtain the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
在一可选的实施例中,在将第一节点所需的资源分配给目标程序后,还可以包括:In an optional embodiment, after allocating the resources required by the first node to the target program, it may further include:
如果传入第一节点的参数与历史传入所述第一节点的参数匹配,且历史子运行轨迹与第二节点对应的子运行轨迹的相似度大于阈值,将第一节点对应的引用计数加1。本申请实施例中,如果传入第一节点的参数与历史传入所述第 一节点的参数匹配,且历史子运行轨迹与第二节点对应的子运行轨迹的相似度大于阈值,说明准确预测到了目标程序的运行轨迹,此时将第一节点对应的引用技术加1。引用计数表征第一节点对应的子运行程序被用户使用的频率,引用计数越大,说明第一节点对应的子运行程序被用户使用的频率越高。If the parameters passed to the first node match the parameters passed to the first node in history, and the similarity between the historical sub-trajectories and the sub-trajectories corresponding to the second node is greater than the threshold, the reference count corresponding to the first node is added to 1. In the embodiment of the present application, if the parameters passed to the first node match the parameters passed to the first node in history, and the similarity between the historical sub-trajectories and the sub-trajectories corresponding to the second node is greater than the threshold, it means that the prediction is accurate. When the running track of the target program is reached, the reference technology corresponding to the first node is incremented by 1. The reference count represents the frequency of the sub-running program corresponding to the first node being used by the user, and the larger the reference count, the higher the frequency of the sub-running program corresponding to the first node being used by the user.
如果传入第一节点的参数与历史传入第一节点的参数匹配,但历史子运行轨迹与第二节点对应的子运行轨迹的相似度小于或等于阈值,或者,传入第一节点的参数与历史传入第一节点的参数不匹配,将第一节点对应的引用计数减1。如果传入第一节点的参数与历史传入第一节点的参数匹配,但历史子运行轨迹与第二节点对应的子运行轨迹的相似度小于或等于阈值,或者,传入第一节点的参数与历史传入第一节点的参数不匹配,说明没有准确预测到目标程序的运行轨迹,此时,将第一节点对应的引用计数减1。If the parameters passed to the first node match the parameters passed to the first node in history, but the similarity between the historical sub-trajectories and the sub-trajectories corresponding to the second node is less than or equal to the threshold, or, the parameters passed to the first node If it does not match the parameters passed to the first node in history, the reference count corresponding to the first node is decremented by 1. If the parameters passed to the first node match the parameters passed to the first node in history, but the similarity between the historical sub-trajectories and the sub-trajectories corresponding to the second node is less than or equal to the threshold, or, the parameters passed to the first node If it does not match the parameters passed to the first node in history, it means that the running trajectory of the target program is not accurately predicted. In this case, the reference count corresponding to the first node is decremented by 1.
基于此,在目标程序的历史运行轨迹中查找与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹时,如果查找到与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹有多个,则可以判断各个历史子运行轨迹之后的节点的引用计数,确定引用计数最大的节点,将各个历史子运行轨迹中,位于该引用计数最大的节点之前的历史子运行轨迹作为最终的与第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹。Based on this, when searching for the historical sub-trajectories with the greatest similarity to the sub-trajectories corresponding to the second node in the historical running trajectories of the target program, if the history with the greatest similarity to the sub running trajectories corresponding to the second node is found, If there are multiple sub-trajectories, you can judge the reference counts of the nodes after each historical sub-trajectory, determine the node with the largest reference count, and assign the historical sub-trajectories before the node with the largest reference count in each historical sub-trajectory. As the final historical sub-trajectory with the greatest similarity to the sub-travel corresponding to the second node.
在一可选的实施例中,本申请实施例提供的信息处理方法还可以包括:In an optional embodiment, the information processing method provided in this embodiment of the present application may further include:
预测位于第一节点之后运行的第三节点;Predict the third node running after the first node;
确定第三节点对应的预测信息,并执行第二节点的至少部分程序片段;第三节点对应的预测信息中携带有为第三节点分配的资源,以及历史传入第三节点的参数。The prediction information corresponding to the third node is determined, and at least a part of the program segment of the second node is executed; the prediction information corresponding to the third node carries the resources allocated for the third node and the parameters historically transmitted to the third node.
可选的,可以根据第三节点的类型确定是执行第三节点的部分程序片段还是全部的程序片段。具体的,如果目标程序的第三节点是人机交互类程序,则可以执行目标程序的第三节点的初始化部分的程序片段,如果目标程序的第三节点是非人机交互类的程序(比如,后台服务程序),则可以执行第三节点的所有程序片段。Optionally, it may be determined according to the type of the third node whether to execute part of the program segments or all the program segments of the third node. Specifically, if the third node of the target program is a human-computer interaction program, the program segment of the initialization part of the third node of the target program can be executed. If the third node of the target program is a non-human-computer interaction program (for example, background service program), all program fragments of the third node can be executed.
可选的,如果目标程序的第三节点是人机交互类程序,且用户预先提供了 人机交互所需的交互数据,则可以执行目标程序的第三节点的所有程序片段,如果目标程序的第三节点是人机交互类程序,且用户未预先提供人机交互所需的交互数据,则可以执行目标程序的第三节点的初始化部分的程序片段。Optionally, if the third node of the target program is a human-computer interaction program, and the user provides the interaction data required for human-computer interaction in advance, all program fragments of the third node of the target program can be executed. The third node is a human-computer interaction type program, and the user does not provide interaction data required for human-computer interaction in advance, then the program fragment of the initialization part of the third node of the target program can be executed.
其中,第三节点为与第一节点相邻的,位于第一节点之后的节点。The third node is a node adjacent to the first node and located after the first node.
本申请实施例中,在目标程序运行到第一节点时,可以根据第一节点对应的子预测轨迹预测需要在第一节点之后运行的节点,如果预测到的节点为第二节点,可以预先运行第二节点,从而在第一节点运行结束时,可以减少第二节点的启动时间,进一步提高目标程序的执行效率。In the embodiment of the present application, when the target program runs to the first node, the node that needs to be run after the first node can be predicted according to the sub-prediction trajectory corresponding to the first node. If the predicted node is the second node, it can be run in advance. The second node can reduce the startup time of the second node and further improve the execution efficiency of the target program when the operation of the first node ends.
另外,若在执行完第一节点后并没有执行第二节点,说明目标程序的实际运行轨迹偏离了目标程序的预测轨迹,则结束第二节点的至少部分程序片段的执行,避免不必要的程序片段的执行造成资源的浪费。In addition, if the second node is not executed after the first node is executed, indicating that the actual running trajectory of the target program deviates from the predicted trajectory of the target program, the execution of at least part of the program segments of the second node is terminated to avoid unnecessary programs. Fragment execution results in a waste of resources.
在一可选的实施例中,本申请实施例提供的信息处理方法还可以包括:In an optional embodiment, the information processing method provided in this embodiment of the present application may further include:
获取用户配置的资源规划文件,该资源规划文件记录了多个指定程序使用资源的优先级和/或资源的使用量,用于根据记录的多个指定程序的优先级和/或资源的使用量调整为多个指定程序分配的资源量。Obtain the resource planning file configured by the user, which records the priority and/or resource usage of multiple specified programs, and is used to record the priority and/or resource usage of multiple specified programs Adjusts the amount of resources allocated for multiple specified programs.
也就是说,本申请实施例中,用户可以向电子设备的操作系统提供资源规划文件以使操作系统获知用户对各指定程序的资源规划需求,该资源规划需求记录了多个指定程序使用资源的优先级和/或资源使用量。That is to say, in this embodiment of the present application, the user may provide a resource planning file to the operating system of the electronic device, so that the operating system can learn the resource planning requirements of the user for each specified program, and the resource planning requirements record the resource planning requirements of multiple specified programs. Priority and/or resource usage.
如果资源规划文件仅记录了多个指定程序使用资源的优先级,则在资源紧缺的情况下,在涉及到为多个指定程序分配资源时,操作系统按照资源规划文件记录的各个指定程序的优先级为优先级较高的程序优先分配资源。If the resource planning file only records the priority of resources used by multiple specified programs, in the case of resource shortage, when allocating resources to multiple specified programs is involved, the operating system records the priority of each specified program according to the resource planning file. The program with higher priority allocates resources first.
如果资源规划文件仅记录了多个指定程序使用资源的使用量,则在需要为多个指定程序中的任意一个程序分配资源时,操作系统按照资源规划文件记录的各个指定程序的资源用量为该程序分配资源。If the resource planning file only records the usage of resources used by multiple specified programs, when resources need to be allocated to any one of the multiple specified programs, the operating system records the resource usage of each specified program according to the resource planning file as the specified program. Programs allocate resources.
如果资源规划文件既记录了多个指定程序使用资源的优先级,又记录了多个指定程序使用资源的使用量,则在资源紧缺的情况下,在涉及到为多个指定程序分配资源时,操作系统按照资源规划文件记录的各个指定程序的优先级为优先级较高的程序优先分配资源,且分配的资源量为规划文件记录的资源使用 量。If the resource planning file records not only the priority of resources used by multiple designated programs, but also the usage of resources used by multiple designated programs, in the case of resource shortage, when it comes to allocating resources to multiple designated programs, The operating system allocates resources preferentially to programs with higher priorities according to the priorities of each designated program recorded in the resource planning file, and the amount of resources allocated is the amount of resource usage recorded in the planning file.
可选的,用户可以通过操作系统提供的可视化资源配置界面向操作系统提供资源规则文件,使得用户可以随时调整操作系统分配给程序的资源。同时,还而可以在可视化资源配置界面实时显示操作系统的资源的使用情况,使得用户可以通过可视化资源配置界面实时的监测操作系统的资源使用情况。此外,还可以在可视化资源配置界面展示程序的运行轨迹,在调试程序或者在程序运行出错时,用户通过可视化的程序运行轨迹能够更轻松准确的定位出问题发生的位置,即通过可视化的界面展示程序的实际运行轨迹和预测运行轨迹。Optionally, the user may provide a resource rule file to the operating system through a visual resource configuration interface provided by the operating system, so that the user can adjust the resources allocated by the operating system to the program at any time. At the same time, the resource usage of the operating system can be displayed in real time on the visual resource configuration interface, so that the user can monitor the resource usage of the operating system in real time through the visual resource configuration interface. In addition, the running track of the program can also be displayed on the visual resource configuration interface. When debugging the program or when the program runs in error, the user can more easily and accurately locate the location of the problem through the visual program running track, that is, through the visual interface display The actual and predicted running trajectories of the program.
本申请实施例中,可以由用户指定任意程序对资源的使用情况,这样,即使在资源不足的情况下,操作系统也可以根据用户的意愿去调整分配给各个程序的资源,进而保证用户所需的程序快速、稳定的执行。In the embodiment of the present application, the user can specify the usage of resources by any program. In this way, even in the case of insufficient resources, the operating system can adjust the resources allocated to each program according to the user's wishes, thereby ensuring that the user needs The program executes quickly and stably.
在一可选的实施例中,本申请实施例提供的信息处理方法还可以包括:In an optional embodiment, the information processing method provided in this embodiment of the present application may further include:
根据目标程序的实际运行轨迹确定目标程序的实际关联程序。The actual associated program of the target program is determined according to the actual running track of the target program.
目标程序在实际运行过程中,可能会与目标程序之外的程序进行交互,这些目标程序之外的程序称为目标程序的关联程序。In the actual running process of the target program, it may interact with programs other than the target program, and these programs other than the target program are called associated programs of the target program.
将目标程序的实际关联程序与目标程序对应的标准关联程序比较。Compare the actual associated program of the target program with the standard associated program corresponding to the target program.
对于一个目标程序而言,目标程序在运行过程中可以与哪些关联程序交互是在目标程序公布时就预先就定义好的,因此,目标程序对应的标准关联程序是已知的。For a target program, the associated programs that the target program can interact with during the running process are pre-defined when the target program is published. Therefore, the standard associated programs corresponding to the target program are known.
若目标程序的实际关联程序中包括非标准关联程序,将非标准关联程序确定为恶意程序。If the actual associated program of the target program includes a non-standard associated program, the non-standard associated program is determined as a malicious program.
目标程序的实际关联程序中包括非标准关联程序,说明该目标程序的实际关联程序中包含不属于目标程序对应的标准关联程序的关联程序,则该关联程序为恶意程序(外挂或木马等)。If the actual associated program of the target program includes a non-standard associated program, it means that the actual associated program of the target program includes an associated program that does not belong to the standard associated program corresponding to the target program, and the associated program is a malicious program (plug-in or Trojan horse, etc.).
在将非标准关联程序确定为恶意程序后,还可以输出提示信息,以通知用户有恶意程序。After the non-standard associated program is determined as a malicious program, prompt information can also be output to notify the user that there is a malicious program.
进一步的,还可以记录恶意程序的实际运行轨迹,进而根据恶意程序的实际运行轨迹可以确定恶意程序的恶意行为。Further, the actual running track of the malicious program can also be recorded, and then the malicious behavior of the malicious program can be determined according to the actual running track of the malicious program.
在一可选的实施例中,如果目标程序使用一个或多个动态链接库文件,可以获取用户触发的链接指令,响应于该链接指令,将用户选择的部分或全部动态链接库文件链接进目标程序,将链接后的目标程序作为目标程序的副本。In an optional embodiment, if the target program uses one or more dynamic link library files, a link instruction triggered by the user can be obtained, and in response to the link instruction, some or all of the dynamic link library files selected by the user are linked into the target program. program, using the linked target program as a copy of the target program.
相应的,前述运行目标程序可以为运行目标程序的副本,通过运行目标程序的副本,可以避免耗时的动态链接过程,进而加快目标程序的运行速度。Correspondingly, the aforementioned running target program may be a copy of the running target program, and by running the copy of the target program, a time-consuming dynamic linking process can be avoided, thereby speeding up the running speed of the target program.
在一可选的实施例中,本申请实施例提供的信息处理方法应用于电子设备中,本申请实施例提供的信息处理方法还可以包括:In an optional embodiment, the information processing method provided by the embodiment of the present application is applied to an electronic device, and the information processing method provided by the embodiment of the present application may further include:
电子设备开始运行后,记录所述电子设备的实际运行轨迹,所述电子设备的实际运行轨迹中记录所述电子设备中已运行的各个程序,各个程序的运行时序,以及开始运行时间相邻的程序间的开始运行时间的间隔。After the electronic device starts to run, the actual running track of the electronic device is recorded, and the actual running track of the electronic device records each program that has been run in the electronic device, the running sequence of each program, and the adjacent start running time. Interval between programs to start running time.
当电子设备中的第一程序运行时,获取与第一程序对应的预测信息,所述第一程序对应的预测信息包括:预测间隔,该预测间隔为第二程序的开始运行时间与第一程序的开始运行时间的间隔。When the first program in the electronic device runs, the prediction information corresponding to the first program is obtained, and the prediction information corresponding to the first program includes: a prediction interval, where the prediction interval is the time between the start time of the second program and the first program. The interval of the start run time.
可选的,可以获取第一程序对应的子运行轨迹,该第一程序对应的子运行轨迹包括第一程序,以及在第一程序之前运行的M-1个程序;在电子设备的历史运行轨迹中查找与第一程序对应的子运行轨迹的相似度最大的历史子运行轨迹;如果电子设备的历史运行轨迹中位于与第一程序对应的子运行轨迹的相似度最大的历史子运行轨迹之后运行的程序为第二程序,将电子设备的历史运行轨迹中位于与第一程序对应的子运行轨迹的相似度最大的历史子运行轨迹之后的第二程序与第一程序的间隔作为预测间隔。Optionally, the sub-running track corresponding to the first program can be obtained, and the sub-running track corresponding to the first program includes the first program and M-1 programs that run before the first program; the historical running track of the electronic device Find the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the first program in the The program is the second program, and the interval between the second program and the first program after the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the first program in the historical running trajectories of the electronic device is used as the prediction interval.
将第二程序启动并在后台运行,在第一程序运行所述预测间隔后,将第二程序调到前台运行。The second program is started and run in the background, and after the first program runs the prediction interval, the second program is transferred to the foreground to run.
如果第二程序为目标程序,就可以提前运行目标程序,进一步提高目标程序的运行效率。If the second program is the target program, the target program can be run in advance to further improve the running efficiency of the target program.
与方法实施例相对应,本申请实施例还提供一种信息处理装置,本申请实施例提供的信息处理装置的一种结构示意图如图3所示,可以包括:Corresponding to the method embodiment, the embodiment of the present application further provides an information processing apparatus. A schematic structural diagram of the information processing apparatus provided by the embodiment of the present application is shown in FIG. 3 , which may include:
运行模块301,资源申请获取模块302,比对模块303和分配模块304;其中, Operation module 301, resource application acquisition module 302, comparison module 303 and allocation module 304; wherein,
运行模块301用于运行目标程序,并记录所述目标程序的实际运行轨迹;所述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;The running module 301 is used to run the target program and record the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
资源申请获取模块302用于获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;The resource application acquisition module 302 is configured to acquire the resource application sent by the target program when running the first node; the first node is any node in the target program;
比对模块303用于响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有历史传入所述第一节点的参数;The comparison module 303 is configured to, in response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
分配模块304用于如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。The allocation module 304 is configured to allocate the resource pre-allocated for the first node to the target program if the parameter passed to the first node matches the parameter passed to the first node in the history; Otherwise, resources required by the first node are allocated to the target program according to preset resource allocation logic.
本申请实施例提供的信息处理装置,在目标程序运行后,记录目标程序的实际运行轨迹;获取目标程序运行第一节点时发出的资源申请;第一节点为目标程序中的任意一个节点;响应于资源申请,获取与第一节点对应的预测信息,预测信息中携带有历史传入第一节点的参数;如果传入第一节点的参数与历史传入第一节点的参数匹配,将预先为第一节点分配的资源分配给目标程序;否则,根据预置的资源分配逻辑为目标程序分配第一节点所需的资源。由于预先为目标程序的分配了第一节点所需的资源,因此,当目标程序运行第一节点时,可以直接将第一节点所需的资源分配给第一节点,避免执行预置的资源分配逻辑,而资源分配逻辑通常都比较复杂,需要考虑的因素比较多,因而通过为目标程序提前分配资源可以减少目标程序等待资源分配的时间,从而提高了目标程序的执行效率。The information processing device provided by the embodiment of the present application records the actual running track of the target program after the target program runs; obtains the resource application sent when the target program runs the first node; the first node is any node in the target program; and responds In the resource application, the prediction information corresponding to the first node is obtained, and the prediction information carries the parameters passed into the first node in history; if the parameters passed into the first node match the parameters passed into the first node in history, it will be preset as The resources allocated by the first node are allocated to the target program; otherwise, resources required by the first node are allocated to the target program according to preset resource allocation logic. Since the target program is pre-allocated with the resources required by the first node, when the target program runs the first node, the resources required by the first node can be directly allocated to the first node to avoid executing the preset resource allocation However, resource allocation logic is usually more complex, and there are many factors to be considered. Therefore, by allocating resources to the target program in advance, the time for the target program to wait for resource allocation can be reduced, thereby improving the execution efficiency of the target program.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
子运行轨迹获取模块,用于在运行所述目标程序的第二节点时,获取与所述第二节点对应的子运行轨迹,所述子运行轨迹包括所述第二节点以及在所述第二节点之前运行的N-1个节点;A sub-running trajectory acquisition module, configured to acquire a sub-running trajectory corresponding to the second node when running the second node of the target program, the sub-running trajectory including the second node and the second node in the second N-1 nodes running before the node;
查找模块,用于在所述目标程序的历史运行轨迹中查找与所述第二节点对 应的子运行轨迹的相似度最大的历史子运行轨迹;A search module is used to search the historical sub-running track with the greatest similarity of the sub-running track corresponding to the second node in the historical running track of the target program;
预测模块,用于如果所述历史运行轨迹中位于所述历史子运行轨迹之后运行的节点为所述第一节点,基于历史传入所述第一节点的参数,根据预置的资源分配逻辑为所述第一节点分配资源作为预测信息。The prediction module is used for if the node running after the historical sub-running track in the historical running track is the first node, based on the parameters passed into the first node based on history, according to the preset resource allocation logic: The first node allocates resources as prediction information.
在一可选的实施例中,所述查找模块包括:In an optional embodiment, the search module includes:
转换单元,用于将所述第二节点对应的子运行轨迹转换为预设数据结构的数据单元;所述数据单元中的每个元素对应一个节点;a conversion unit, configured to convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node;
计算单元,用于分别计算所述数据单元与所述历史运行轨迹中的每一个历史数据单元的相似度;a calculation unit, used for calculating the similarity between the data unit and each historical data unit in the historical running track;
获取单元,用于获取与所述数据单元的相似度最大的历史数据单元对应的历史子运行轨迹。An acquiring unit, configured to acquire the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:计数模块,用于如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,且所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度大于阈值,将所述第一节点对应的引用计数加1;如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,但所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度小于或等于阈值,或者,传入所述第一节点的参数与所述历史传入所述第一节点的参数不匹配,将所述第一节点对应的引用计数减1。In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include: a counting module, configured to: if the parameters passed into the first node and the history parameters passed into the first node match, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the threshold, add 1 to the reference count corresponding to the first node; if the parameter passed to the first node is the same as The parameters passed into the history of the first node match, but the similarity between the historical sub-running trajectory and the sub-running trajectory corresponding to the second node is less than or equal to the threshold, or, the information passed to the first node. If the parameter does not match the parameter passed into the first node from the history, the reference count corresponding to the first node is decremented by 1.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
预执行模块,用于在预测位于所述第一节点之后运行的第三节点,确定所述第三节点对应的预测信息后,执行所述第二节点的至少部分程序片段;所述第三节点对应的预测信息中携带有为所述第三节点分配的资源,以及历史传入所述第三节点的参数。a pre-execution module, configured to execute at least part of the program segment of the second node after predicting a third node that runs after the first node, and after determining the prediction information corresponding to the third node; the third node The corresponding prediction information carries the resources allocated to the third node and the parameters historically transmitted to the third node.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
资源规划模块,用于获取用户配置的资源规划文件,所述资源规划文件记录了多个指定程序使用资源的优先级和/或资源的使用量;所述资源规划文件用于根据所述多个指定程序的优先级和/或资源的使用量调整为所述多个指定 程序分配的资源量。A resource planning module, configured to obtain a resource planning file configured by a user, the resource planning file records the priority of resources used by multiple specified programs and/or the usage amount of the resources; the resource planning file is used for according to the multiple The priority of the designated programs and/or the amount of resource usage adjusts the amount of resources allocated to the plurality of designated programs.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
恶意程序检测模块,用于根据所述目标程序的实际运行轨迹确定所述目标程序的实际关联程序;将所述目标程序的实际关联程序与所述目标程序对应的标准关联程序比较;若所述目标程序的实际关联程序中包括非标准关联程序,将所述非标准关联程序确定为恶意程序。a malicious program detection module, configured to determine the actual associated program of the target program according to the actual running track of the target program; compare the actual associated program of the target program with the standard associated program corresponding to the target program; if the The actual associated programs of the target program include non-standard associated programs, and the non-standard associated programs are determined to be malicious programs.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
动态链接模块,用于获取用户触发的链接指令,响应于该链接指令,将用户选择的部分或全部动态链接库文件链接进目标程序,将链接后的目标程序作为目标程序的副本。The dynamic link module is used to obtain the link instruction triggered by the user, and in response to the link instruction, link part or all of the dynamic link library files selected by the user into the target program, and use the linked target program as a copy of the target program.
相应的,运行模块301具体用于运行目标程序的副本。Correspondingly, the running module 301 is specifically configured to run the copy of the target program.
在一可选的实施例中,本申请实施例提供的信息处理装置还可以包括:In an optional embodiment, the information processing apparatus provided in this embodiment of the present application may further include:
程序预运行模块,用于在电子设备开始运行后,记录所述电子设备的实际运行轨迹,所述电子设备的实际运行轨迹中记录所述电子设备中已运行的各个程序,各个程序的运行时序,以及开始运行时间相邻的程序间的开始运行时间的间隔。The program pre-running module is used to record the actual running track of the electronic device after the electronic device starts to run, and the actual running track of the electronic device records each program that has been run in the electronic device, and the running sequence of each program. , and the interval between the start-run times of programs adjacent to the start-run times.
当电子设备中的第一程序运行时,获取与第一程序对应的预测信息,所述第一程序对应的预测信息包括:预测间隔,该预测间隔为第二程序的开始运行时间与第一程序的开始运行时间的间隔。When the first program in the electronic device runs, the prediction information corresponding to the first program is obtained, and the prediction information corresponding to the first program includes: a prediction interval, where the prediction interval is the time between the start time of the second program and the first program. The interval of the start run time.
将第二程序启动并在后台运行,在第一程序运行所述预测间隔后,将第二程序调到前台运行。The second program is started and run in the background, and after the first program runs the prediction interval, the second program is transferred to the foreground to run.
如果第二程序为目标程序,就可以提前运行目标程序,进一步提高目标程序的运行效率。If the second program is the target program, the target program can be run in advance to further improve the running efficiency of the target program.
本申请实施例提供的信息处理装置可应用于电子设备中,如PC终端、云平台、服务器及服务器集群等。可选的,图4示出了本申请实施例提供的电子设备的硬件结构框图,参照图4,该电子设备的硬件结构可以包括:The information processing apparatus provided by the embodiments of the present application can be applied to electronic equipment, such as a PC terminal, a cloud platform, a server, and a server cluster. Optionally, FIG. 4 shows a block diagram of a hardware structure of an electronic device provided by an embodiment of the present application. Referring to FIG. 4 , the hardware structure of the electronic device may include:
至少一个处理器1,至少一个通信接口2,至少一个存储器3和至少一个通信总线4。At least one processor 1 , at least one communication interface 2 , at least one memory 3 and at least one communication bus 4 .
在本申请实施例中,处理器1、通信接口2、存储器3、通信总线4的数量为至少一个,且处理器1、通信接口2、存储器3通过通信总线4完成相互间的通信;In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete the communication with each other through the communication bus 4;
处理器1可能是一个中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路等;The processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
存储器3可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory)等,例如至少一个磁盘存储器;The memory 3 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
其中,存储器存储有程序,处理器可调用存储器存储的程序,所述程序用于:Wherein, the memory stores a program, and the processor can call the program stored in the memory, and the program is used for:
运行目标程序,并记录所述目标程序的实际运行轨迹;所述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;Running the target program, and recording the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;Obtain the resource application sent when the target program runs the first node; the first node is any node in the target program;
响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有历史传入所述第一节点的参数;In response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。If the parameters passed to the first node match the parameters passed to the first node in the history, allocate the resources pre-allocated for the first node to the target program; otherwise, according to the preset The resource allocation logic allocates the resources required by the first node to the target program.
可选的,所述程序的细化功能和扩展功能可参照上文描述。Optionally, the refinement function and extension function of the program may refer to the above description.
本申请实施例还提供一种存储介质,该存储介质可存储有适于处理器执行的程序,所述程序用于:An embodiment of the present application further provides a storage medium, where the storage medium can store a program suitable for the processor to execute, and the program is used for:
运行目标程序,并记录所述目标程序的实际运行轨迹;所述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;Running the target program, and recording the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has been run, and the parameters passed into each node;
获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;Obtain the resource application sent when the target program runs the first node; the first node is any node in the target program;
响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有历史传入所述第一节点的参数;In response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配, 将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。If the parameters passed to the first node match the parameters passed to the first node in the history, allocate the resources pre-allocated for the first node to the target program; otherwise, according to the preset The resource allocation logic allocates the resources required by the first node to the target program.
可选的,所述程序的细化功能和扩展功能可参照上文描述。Optionally, the refinement function and extension function of the program may refer to the above description.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
应当理解,本申请实施例中,从权、各个实施例、特征可以互相组合结合,都能实现解决前述技术问题。It should be understood that, in the embodiments of the present application, the rights, various embodiments, and features can be combined with each other, and the aforementioned technical problems can be solved.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质 包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

  1. 一种信息处理方法,其特征在于,包括:An information processing method, comprising:
    运行目标程序,并记录所述目标程序的实际运行轨迹;所述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;所述各个节点的参数为各个节点所需的资源及资源量;Run the target program, and record the actual running track of the target program; the actual running track includes the running sequence of each node that the target program has run, and the parameters passed into each node; the parameters of each node are each The resources and amount of resources required by the node;
    获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;Obtain the resource application sent when the target program runs the first node; the first node is any node in the target program;
    响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有历史传入所述第一节点的参数;In response to the resource application, obtain prediction information corresponding to the first node, where the prediction information carries parameters historically transmitted to the first node;
    如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。If the parameters passed to the first node match the parameters passed to the first node in the history, allocate the resources pre-allocated for the first node to the target program; otherwise, according to the preset The resource allocation logic allocates the resources required by the first node to the target program.
  2. 根据权利要求1所述的方法,其特征在于,所述第一节点对应的预测信息通过如下方式获取:The method according to claim 1, wherein the prediction information corresponding to the first node is obtained in the following manner:
    在运行所述目标程序的第二节点时,获取与所述第二节点对应的子运行轨迹,所述子运行轨迹包括所述第二节点以及在所述第二节点之前运行的N-1个节点;When running the second node of the target program, obtain a sub-running trajectory corresponding to the second node, where the sub-running trajectory includes the second node and N-1 running before the second node node;
    在所述目标程序的历史运行轨迹中查找与所述第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹;Searching for the historical sub-trajectory with the greatest similarity to the sub-trajectory corresponding to the second node in the historical running trajectory of the target program;
    如果所述历史运行轨迹中位于所述历史子运行轨迹之后运行的节点为所述第一节点,基于历史传入所述第一节点的参数,根据预置的资源分配逻辑为所述第一节点分配资源作为预测信息。If the node running after the historical sub-running track in the historical running track is the first node, the first node is the first node according to the preset resource allocation logic based on the parameters passed to the first node in history. Allocate resources as forecast information.
  3. 根据权利要求2所述的方法,其特征在于,所述在所述目标程序的历史运行轨迹中查找与所述第二节点对应的子运行轨迹的相似度最大的历史子运行轨迹,包括:The method according to claim 2, wherein, in the historical running trajectories of the target program, searching for the historical sub-running trajectory with the greatest similarity to the sub-running trajectory corresponding to the second node comprises:
    将所述第二节点对应的子运行轨迹转换为预设数据结构的数据单元;所述数据单元中的每个元素对应一个节点;Convert the sub-running trajectory corresponding to the second node into a data unit of a preset data structure; each element in the data unit corresponds to a node;
    分别计算所述数据单元与所述历史运行轨迹中的每一个历史数据单元的相似度;respectively calculating the similarity between the data unit and each historical data unit in the historical running track;
    获取与所述数据单元的相似度最大的历史数据单元对应的历史子运行轨迹。Obtain the historical sub-running track corresponding to the historical data unit with the largest similarity of the data unit.
  4. 根据权利要求2所述的方法,其特征在于,在将所述第一节点所需的资源分配给所述目标程序后,还包括:The method according to claim 2, wherein after allocating the resources required by the first node to the target program, the method further comprises:
    如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,且所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度大于阈值,将所述第一节点对应的引用计数加1;If the parameter passed to the first node matches the historical parameter passed to the first node, and the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is greater than the threshold, the The reference count corresponding to the first node is incremented by 1;
    如果传入所述第一节点的参数与所述历史传入所述第一节点的参数匹配,但所述历史子运行轨迹与所述第二节点对应的子运行轨迹的相似度小于或等于阈值,或者,传入所述第一节点的参数与所述历史传入所述第一节点的参数不匹配,将所述第一节点对应的引用计数减1。If the parameter passed to the first node matches the historical parameter passed to the first node, but the similarity between the historical sub-trajectory and the sub-trajectory corresponding to the second node is less than or equal to the threshold , or, if the parameter passed to the first node does not match the parameter passed to the first node in the history, the reference count corresponding to the first node is decremented by 1.
  5. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    预测位于所述第一节点之后运行的第三节点;predicting a third node running after said first node;
    确定所述第三节点对应的预测信息,并执行所述第二节点的至少部分程序片段;所述第三节点对应的预测信息中携带有为所述第三节点分配的资源,以及历史传入所述第三节点的参数。Determine the prediction information corresponding to the third node, and execute at least part of the program segment of the second node; the prediction information corresponding to the third node carries the resources allocated for the third node, and the historical incoming parameters of the third node.
  6. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    获取用户配置的资源规划文件,所述资源规划文件记录了多个指定程序使用资源的优先级和/或资源的使用量;Acquiring a resource planning file configured by the user, the resource planning file recording the priority of resources used by multiple specified programs and/or the usage amount of resources;
    所述资源规划文件用于根据所述多个指定程序的优先级和/或资源的使用量调整为所述多个指定程序分配的资源量。The resource planning file is used to adjust the amount of resources allocated to the plurality of specified programs according to the priorities of the plurality of specified programs and/or the usage of resources.
  7. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    根据所述目标程序的实际运行轨迹确定所述目标程序的实际关联程序;Determine the actual associated program of the target program according to the actual running track of the target program;
    将所述目标程序的实际关联程序与所述目标程序对应的标准关联程序比较;comparing the actual associated program of the target program with the standard associated program corresponding to the target program;
    若所述目标程序的实际关联程序中包括非标准关联程序,将所述非标准关联程序确定为恶意程序。If the actual associated program of the target program includes a non-standard associated program, the non-standard associated program is determined as a malicious program.
  8. 一种信息处理装置,其特征在于,包括:An information processing device, comprising:
    运行模块,用于运行目标程序,并记录所述目标程序的实际运行轨迹;所 述实际运行轨迹包括所述目标程序已运行的各个节点的运行时序,以及传入各个节点的参数;所述各个节点的参数为各个节点所需的资源及资源量;an operation module, used to run the target program and record the actual running track of the target program; the actual running track includes the running sequence of each node on which the target program has run, and the parameters passed into each node; the The parameters of the nodes are the resources and resources required by each node;
    资源申请获取模块,用于获取所述目标程序运行第一节点时发出的资源申请;所述第一节点为所述目标程序中的任意一个节点;a resource application acquisition module, configured to acquire a resource application issued when the target program runs a first node; the first node is any node in the target program;
    比对模块,用于响应于所述资源申请,获取与所述第一节点对应的预测信息,所述预测信息中携带有预先为所述第一节点分配的资源,以及历史传入所述第一节点的参数;A comparison module, configured to obtain prediction information corresponding to the first node in response to the resource application, where the prediction information carries the resources pre-allocated for the first node, and the historical input to the first node the parameters of a node;
    分配模块,用于如果传入所述第一节点的参数与所述历史传入所述第一节点的参数与所述第一节点申请的资源匹配,将所述预先为所述第一节点分配的资源分配给所述目标程序;否则,根据预置的资源分配逻辑为所述目标程序分配所述第一节点所需的资源。an allocation module, configured to allocate the pre-allocated first node to the first node if the parameters passed to the first node and the historical parameters passed to the first node match the resources applied for by the first node Allocate the resource of the target program to the target program; otherwise, allocate the resource required by the first node to the target program according to the preset resource allocation logic.
  9. 一种电子设备,其特征在于,包括存储器和处理器;An electronic device, comprising a memory and a processor;
    所述存储器用于存储程序;the memory is used to store programs;
    所述处理器用于执行所述存储器中存储的程序,以实现如权利要求1-7任意一项所述的信息处理方法的各个步骤。The processor is configured to execute the program stored in the memory, so as to implement each step of the information processing method according to any one of claims 1-7.
  10. 一种计算机可读存储介质,其上存储有程序,其特征在于,所述程序被处理器执行时,实现如权利要求1-7任意一项所述的信息处理方法的各个步骤。A computer-readable storage medium on which a program is stored, characterized in that, when the program is executed by a processor, each step of the information processing method according to any one of claims 1-7 is implemented.
PCT/CN2021/124356 2021-01-05 2021-10-18 Information processing method and apparatus, and device and storage medium WO2022148086A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110006858.9 2021-01-05
CN202110006858.9A CN112667405B (en) 2021-01-05 2021-01-05 Information processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022148086A1 true WO2022148086A1 (en) 2022-07-14

Family

ID=75412829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124356 WO2022148086A1 (en) 2021-01-05 2021-10-18 Information processing method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN112667405B (en)
WO (1) WO2022148086A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667405B (en) * 2021-01-05 2021-09-24 田宇 Information processing method, device, equipment and storage medium
CN113407250B (en) * 2021-05-06 2024-08-30 银河电力集团股份有限公司 Running method of microcontroller and terminal
CN116908601B (en) * 2023-09-13 2023-12-01 深圳市旺城行电子有限公司 Grounding transformer running state monitoring system
CN117893017B (en) * 2024-01-17 2024-10-29 应急管理部大数据中心 Tailing pond accident risk prediction method and system based on satellite remote sensing image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454019A (en) * 2017-09-28 2017-12-08 北京邮电大学 Software defined network distribution method of dynamic bandwidth, device, equipment and storage medium
WO2018123791A1 (en) * 2016-12-30 2018-07-05 Nec Corporation Method, system and storage medium for recommending resource allocation to target subject
CN109753207A (en) * 2017-11-02 2019-05-14 腾讯科技(深圳)有限公司 A kind of information processing method and its device, storage medium
CN111611166A (en) * 2020-05-22 2020-09-01 厦门理工学院 Software testing method and system based on mobile internet
CN112148497A (en) * 2020-10-12 2020-12-29 江苏云柜网络技术有限公司 Disk resource management method and device and electronic equipment
CN112667405A (en) * 2021-01-05 2021-04-16 田宇 Information processing method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284871A (en) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 Resource adjusting method, device and cloud platform
CN110109753A (en) * 2019-04-25 2019-08-09 成都信息工程大学 Resource regulating method and system based on various dimensions constraint genetic algorithm
CN110166381B (en) * 2019-06-03 2022-09-30 广东电网有限责任公司 Computer device, equipment and method for distributing power communication network resources
CN110505276B (en) * 2019-07-17 2022-05-06 北京三快在线科技有限公司 Object matching method, device and system, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018123791A1 (en) * 2016-12-30 2018-07-05 Nec Corporation Method, system and storage medium for recommending resource allocation to target subject
CN107454019A (en) * 2017-09-28 2017-12-08 北京邮电大学 Software defined network distribution method of dynamic bandwidth, device, equipment and storage medium
CN109753207A (en) * 2017-11-02 2019-05-14 腾讯科技(深圳)有限公司 A kind of information processing method and its device, storage medium
CN111611166A (en) * 2020-05-22 2020-09-01 厦门理工学院 Software testing method and system based on mobile internet
CN112148497A (en) * 2020-10-12 2020-12-29 江苏云柜网络技术有限公司 Disk resource management method and device and electronic equipment
CN112667405A (en) * 2021-01-05 2021-04-16 田宇 Information processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112667405B (en) 2021-09-24
CN112667405A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2022148086A1 (en) Information processing method and apparatus, and device and storage medium
US9742652B2 (en) Proactive identification of hotspots in a cloud computing environment
EP3401787B1 (en) Analyzing resource utilization of a cloud computing resource in a cloud computing environment
US9684562B2 (en) Automatic serial starting of resource groups on failover based on the prediction of aggregate resource usage
US9218196B2 (en) Performing pre-stage replication of data associated with virtual machines prior to migration of virtual machines based on resource usage
US9875124B2 (en) Data assignment and data scheduling for physical machine in a virtual machine environment
US10102033B2 (en) Method and system for performance ticket reduction
US20130227144A1 (en) Operation managing method for computer system, computer system and computer-readable storage medium having program thereon
US20210389990A1 (en) Computer system and control method for computer system
US20120323821A1 (en) Methods for billing for data storage in a tiered data storage system
US20160352821A1 (en) Method and system for allocating resources for virtual hosts
US20220038355A1 (en) Intelligent serverless function scaling
CN112988185A (en) Cloud application updating method, device and system, electronic equipment and storage medium
JP2022159405A (en) Method and device for appending data, electronic device, storage medium, and computer program
US20240012683A1 (en) Resource Management Unit for Capturing Operating System Configuration States and Offloading Tasks
US9473572B2 (en) Selecting a target server for a workload with a lowest adjusted cost based on component values
CN115061813A (en) Cluster resource management method, device, equipment and medium
CN109343859A (en) Information processing method, device and storage medium
CN110569157B (en) Storage testing method, device, server and storage medium
CN110781159A (en) Ceph directory file information reading method and device, server and storage medium
CN118250206A (en) High concurrency pressure testing method and related device based on flow playback
WO2023016485A1 (en) Method for acquiring function call information, and apparatus, electronic device and medium
US20200042331A1 (en) Dynamic-link library usage based on memory size
US11954534B2 (en) Scheduling in a container orchestration system utilizing hardware topology hints
US11977907B2 (en) Hybrid push and pull event source broker for serverless function scaling

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21917128

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21917128

Country of ref document: EP

Kind code of ref document: A1