CN117041353B - Task processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN117041353B
CN117041353B CN202311296745.2A CN202311296745A CN117041353B CN 117041353 B CN117041353 B CN 117041353B CN 202311296745 A CN202311296745 A CN 202311296745A CN 117041353 B CN117041353 B CN 117041353B
Authority
CN
China
Prior art keywords
target
component
equipment
task
components
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311296745.2A
Other languages
Chinese (zh)
Other versions
CN117041353A (en
Inventor
杨冬东
顾瑶瑶
肖翔
马戈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202311296745.2A priority Critical patent/CN117041353B/en
Publication of CN117041353A publication Critical patent/CN117041353A/en
Application granted granted Critical
Publication of CN117041353B publication Critical patent/CN117041353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to the technical field of computers, and particularly provides a task processing method, a task processing device, electronic equipment and a storage medium. When a task request for a target task is received, if the task request meets the execution condition of a device component, determining a corresponding target software layer of the task request in a software stack; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state; calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing a target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component. Therefore, each software layer in the software stack can call the corresponding equipment component through the component call interface, so that the adaptation problem caused by the difference of different equipment components is avoided, and the application range of the equipment components is enlarged.

Description

Task processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a task processing method, a task processing device, an electronic device, and a storage medium.
Background
As technology advances, various device components (e.g., hardware and functional modules) in electronic devices are also being updated.
In practical application, due to different manufacturers or different equipment components with different models, different equipment components with the same functions generally have some differences, so that different equipment components are generally applicable to different task processing scenes, and each functional component is generally applicable to a smaller range.
Disclosure of Invention
An object of an embodiment of the present application is to provide a method, an apparatus, an electronic device, and a storage medium for task processing, so as to improve an application range of a device component when task processing is performed.
In one aspect, an embodiment of the present application provides a method for task processing, where the method includes:
when a task request aiming at a target task is received, if the task request meets the execution condition of the equipment component, determining a corresponding target software layer of the task request in a software stack; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state;
calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing a target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component.
In one embodiment, the method further comprises:
if the device component scheduling conditions are met, determining associated devices corresponding to the task requests; the scheduling condition of the equipment component is determined according to the communication state of the equipment network;
acquiring component resource information of each device component of the associated device;
screening out target equipment components from all equipment components of the associated equipment according to the component resource information of all equipment components;
generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component;
and sending a device component scheduling instruction to the target associated device corresponding to the target device component, so that the target associated device invokes the target device component to execute the device component scheduling instruction.
In one embodiment, determining an associated device corresponding to a task request includes:
acquiring target account information corresponding to the task request;
and determining the electronic equipment which is correspondingly set by the target account information as the associated equipment.
In one embodiment, obtaining component resource information for each device component of an associated device includes:
acquiring a coding tree of the associated equipment; the coding tree contains component resource information of each device component of the associated device;
And acquiring component resource information of each device component of the associated device according to the coding tree of the associated device.
In one embodiment, screening a target device component from the device components of the associated device according to component resource information of the device components includes:
evaluating each equipment component according to the component resource information of each equipment component;
and screening out the target equipment components according to the evaluation results of the equipment components.
In one embodiment, generating a device component scheduling instruction corresponding to a target device component according to a target task and the target device component includes:
if the target equipment components are multiple, decomposing the target tasks to obtain subtasks corresponding to the target equipment components respectively;
determining the operation parameters of each target equipment component according to the component resource information corresponding to each target equipment component;
and respectively generating corresponding equipment component scheduling instructions according to the subtasks and the operation parameters respectively corresponding to the target equipment components.
In one embodiment, sending a device component scheduling instruction to a target associated device corresponding to a target device component includes:
acquiring transmission capability information and transmission authority information of at least one encapsulation network of the target associated equipment; the encapsulation network is generated after the radio frequency network is encapsulated;
Selecting a target encapsulation network corresponding to the associated equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling instruction to the target associated device through the target encapsulation network of the target associated device.
In one embodiment, the method further comprises:
if the scheduling condition of the equipment component is met, acquiring transmission capability information and transmission authority information of at least one encapsulation network of the control equipment;
selecting a target encapsulation network corresponding to the control equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling request aiming at the target task to the control device through a target encapsulation network of the control device, so that the control device calls the target device component in all device components of the associated device corresponding to the device component scheduling request to execute the target task based on the device component scheduling request.
In one aspect, an embodiment of the present application provides a device for task processing, including:
the determining unit is used for determining a corresponding target software layer of the task request in the software stack if the task request meets the execution condition of the equipment component when the task request aiming at the target task is received; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state;
The calling unit is used for calling a target device component corresponding to the task request through a component calling interface of the target software layer and executing the target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component.
In an embodiment, the determining unit is further configured to:
if the device component scheduling conditions are met, determining associated devices corresponding to the task requests; the scheduling condition of the equipment component is determined according to the communication state of the equipment network;
acquiring component resource information of each device component of the associated device;
screening out target equipment components from all equipment components of the associated equipment according to the component resource information of all equipment components;
generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component;
and sending a device component scheduling instruction to the target associated device corresponding to the target device component, so that the target associated device invokes the target device component to execute the device component scheduling instruction.
In an embodiment, the determining unit is further configured to:
acquiring target account information corresponding to the task request;
and determining the electronic equipment which is correspondingly set by the target account information as the associated equipment.
In an embodiment, the determining unit is further configured to:
acquiring a coding tree of the associated equipment; the coding tree contains component resource information of each device component of the associated device;
and acquiring component resource information of each device component of the associated device according to the coding tree of the associated device.
In an embodiment, the determining unit is further configured to:
evaluating each equipment component according to the component resource information of each equipment component;
and screening out the target equipment components according to the evaluation results of the equipment components.
In an embodiment, the determining unit is further configured to:
if the target equipment components are multiple, decomposing the target tasks to obtain subtasks corresponding to the target equipment components respectively;
determining the operation parameters of each target equipment component according to the component resource information corresponding to each target equipment component;
and respectively generating corresponding equipment component scheduling instructions according to the subtasks and the operation parameters respectively corresponding to the target equipment components.
In an embodiment, the determining unit is further configured to:
acquiring transmission capability information and transmission authority information of at least one encapsulation network of the target associated equipment; the encapsulation network is generated after the radio frequency network is encapsulated;
Selecting a target encapsulation network corresponding to the associated equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling instruction to the target associated device through the target encapsulation network of the target associated device.
In an embodiment, the determining unit is further configured to:
if the scheduling condition of the equipment component is met, acquiring transmission capability information and transmission authority information of at least one encapsulation network of the control equipment;
selecting a target encapsulation network corresponding to the control equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling request aiming at the target task to the control device through a target encapsulation network of the control device, so that the control device calls the target device component in all device components of the associated device corresponding to the device component scheduling request to execute the target task based on the device component scheduling request.
In one aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory storing computer instructions for causing a processor to perform the steps of the method provided in various alternative implementations of any of the task processing described above.
In one aspect, a storage medium is provided in an embodiment of the present application, where the storage medium stores computer instructions for causing a computer to perform the steps of a method provided in various alternative implementations of any of the task processing described above.
The task processing method in the embodiment of the application comprises the steps that when a task request aiming at a target task is received, if the task request meets the execution condition of a device component, a corresponding target software layer of the task request in a software stack is determined; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state; calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing a target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component. Therefore, each software layer in the software stack can call the corresponding equipment component through the component call interface, so that the adaptation problem caused by the difference of different equipment components is avoided, and the application range of the equipment components is enlarged.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic architecture diagram of a task processing system according to an embodiment of the present application.
FIG. 2 is a flow chart of a method of task processing in an embodiment of the present application.
Fig. 3 is a flow chart of a method of device component scheduling in an embodiment of the present application.
Fig. 4 is a flow chart of another method of device component scheduling in an embodiment of the present application.
Fig. 5 is a block diagram of an apparatus for task processing in an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are described. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. In addition, the technical features described below in the different embodiments of the present application may be combined with each other as long as they do not collide with each other.
Some of the terms referred to in the embodiments of the present application will be described first to facilitate understanding by those skilled in the art.
Terminal equipment: the mobile terminal, stationary terminal or portable terminal may be, for example, a mobile handset, a site, a unit, a device, a multimedia computer, a multimedia tablet, an internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communications system device, a personal navigation device, a personal digital assistant, an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a game device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It is also contemplated that the electronic device can support any type of interface to the user (e.g., a wearable device), etc.
And (3) a server: the cloud server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, basic cloud computing services such as big data and artificial intelligent platforms and the like.
Based on the defects of the related art, the embodiment of the application provides a task processing method, a device, an electronic device and a storage medium, which aim to improve the application range of a device component when task processing is performed.
Referring to FIG. 1, a schematic architecture of a task processing system is shown. The system includes a control device and a plurality of electronic devices.
The electronic equipment is used for calling a target equipment component of the electronic equipment to execute a target task when the execution condition of the equipment component is met; the method is also used for determining associated equipment from the electronic equipment when the equipment component scheduling conditions are met, calling a target equipment component of the associated equipment and executing a target task; and the control device is also used for determining the associated device from the electronic devices and calling the target device component of the associated device to execute the target task when the device component scheduling condition is met.
The electronic device and the control device may be the same device or different devices. As an example, the available resources of each electronic device may be periodically evaluated, and the electronic device with the largest available resources may be used as the control device. That is, the control device is not a fixed device, but may be a device with the most abundant resources as the control device. In this way, by controlling the real-time transformation of the device, a better efficiency of the scheduling of the device components can be ensured.
Wherein the device component execution conditions and the device component scheduling conditions are determined according to the device network communication state.
As one example, the device component scheduling conditions may be: the device network communication state of the electronic device is non-communicable. The device component scheduling conditions may be: the device network communication state of the electronic device is communicable.
Referring to fig. 2, a flowchart of a task processing method in an embodiment of the present application is applied to the electronic device in fig. 1, and the type of the electronic device is not limited in this application, and may be any device type suitable for implementation, for example, a terminal device, a server, etc., which is not described herein. The following describes the method with reference to fig. 1 and 2, and the specific implementation procedure of the method is as follows:
step 200: and when a task request aiming at a target task is received, if the task request meets the execution condition of the equipment component, determining a corresponding target software layer of the task request in a software stack.
The electronic device is provided with a software stack, and the software stack comprises a plurality of software layers, such as an operating system, an architecture layer, a protocol, a runtime environment, a database system, a function call and the like.
It should be noted that, different task requests may be different for the corresponding executed software layers, and thus, the target software layer for executing the task request may be determined from the software stack.
Step 201: calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing a target task; corresponding component calling interfaces are respectively arranged in each software layer of the software stack for each device component.
The device components may include hardware and functional modules, among others.
In the embodiment of the application, the component calling interfaces corresponding to each device component are preset in each software layer, so that corresponding component calling interfaces can be provided for software layers of different programming languages, each software layer of any programming language in a software stack can call a target device component through the corresponding component calling interface, and different types of hardware can be called through the component calling interfaces, so that the hardware operation difference of different manufacturer types can be shielded. Thus, when the electronic equipment of the user does not have a network, the interface can be called through the components of each software layer, all equipment component capabilities of the electronic equipment of the user are called, and the target task is executed.
Further, if it is determined that the device component scheduling condition is met, the electronic device may also call the device component in the other electronic device to execute the target task.
Referring to fig. 3, a flowchart of a method for scheduling device components is shown and is applied to the electronic device in fig. 1, and the method is described below with reference to fig. 1 and 3.
Step 300: and if the device component scheduling conditions are met, determining the associated device corresponding to the task request.
In one embodiment, when performing step 300, the following steps may be employed:
s3001: and if the equipment network communication state of the electronic equipment is determined to be communicable, acquiring target account information corresponding to the task request.
In one embodiment, at least one piece of user account information included in the task request or user account information (i.e., user account information used by a user for logging in) set corresponding to the task request is used as the target account information.
The user account information may include a user name and a password, among others.
In one embodiment, user account information corresponding to the task request is obtained, at least one piece of user account information related to the user account information is obtained, and the user account information corresponding to the task request and the user account information related to the user account information are used as target account information.
Further, an association relationship between a plurality of different user account information may be established in advance. As one example, an association relationship between a plurality of different user account information of the same user is established.
In one embodiment, the implementation procedure of S3001 may further include:
the user registers the account number to obtain user account number information, and establishes a corresponding relation between the user account number information and all the electronic devices of the user so as to bind the user account number information with each electronic device of the user, and the user can log in all the electronic devices of the user by adopting unified user account number information. A device maintenance list including user account information and device information for each corresponding electronic device may also be generated.
Further, when a new electronic device exists, the new electronic device is registered and authorized based on the user account information, and the registered and authorized device information of the electronic device is added into a device maintenance list.
In one embodiment, the device maintenance list is updated synchronously in both the control device and each electronic device.
Further, when the user logs in the electronic equipment through the user account information, the electronic equipment acquires verification information of the user, authenticates the user through the verification information, and if the authentication is successful, allows the user to log in the electronic equipment, otherwise, prohibits the user from logging in the electronic equipment.
Wherein the authentication information may include at least one of a biometric identifier and a password. The biometric identifier may include at least one of a fingerprint and facial information.
S3002: and determining the electronic equipment which is correspondingly set by the target account information as the associated equipment.
Alternatively, the association device may be one or more.
In one embodiment, the target account information includes user account information of the user, and the associated device includes an electronic device of the user.
Step 301: component resource information of each device component of the associated device is obtained.
In one embodiment, when step 301 is performed, the following steps may be employed:
s3011: acquiring a coding tree of the associated equipment; the code tree contains component resource information of each device component of the associated device.
In one embodiment, component resource information of each device component of each electronic device is obtained, a code tree corresponding to each electronic device is generated based on the component resource information of each device component of each electronic device, and the code tree corresponding to each electronic device is generated. If a network exists between the devices, the coding trees are synchronously updated to the control device (e.g., cloud) and the electronic devices (e.g., routers in a local area network or mobile phones in a near field communication scene) respectively.
The component resource information may include an identifier of the device component and operation status information, and may also include an operation condition of the device component. The operational status information may be updated continuously as the operational status of the device components changes. The operating conditions of the different device components of the same function may be the same or different. As an example, default device component configuration information may be used as the operating conditions of the device components, and the operating conditions may be updated based on user feedback so that new operating conditions of the device components may be learned.
S3012: and acquiring component resource information of each device component of the associated device according to the coding tree of the associated device.
Thus, the device component query can be performed through the coding tree, and the convenience and the efficiency of the device component query are improved.
Step 302: and screening out the target equipment components from the equipment components of the associated equipment according to the component resource information of the equipment components.
In one embodiment, when step 302 is performed, the following steps may be employed:
s3021: and evaluating each equipment component according to the component resource information of each equipment component.
In one embodiment, when S3021 is performed, the following steps may be adopted:
s3021-1: and screening a plurality of target equipment components for executing the target task from the equipment components in the at least one electronic equipment according to the running state information corresponding to the equipment components of the at least one electronic equipment.
In one embodiment, when step S3021-1 is performed, the following steps may be employed:
s3021-11: and combining all the equipment components of at least one electronic equipment according to the target task to obtain a plurality of equipment component sets.
In one embodiment, each type of device component that can be used to perform the target task is first selected from the device components of each electronic device, and then the device components of different types are combined respectively.
Wherein one or more similar device components may be included in the same electronic device. One or more like device components, such as two processors, may also be included in the same set of device components.
For example, the first type of device component is: a first processor of the first electronic device, and a second processor and a third processor of the second electronic device. The second class of device components are: a first camera of the second electronic device, and a second camera of the second electronic device. The first type of device component and the second type of device component may be combined separately to obtain a plurality of device component sets. The device assembly set comprises two device assemblies, one is a processor, and the other is a camera.
S3021-12: and respectively evaluating each equipment component set according to the running state information of each equipment component in each equipment component set.
Wherein, the evaluation index of the evaluation result may include at least one of: power consumption and performance.
As one example, the power consumption of resources consumed when each set of device components performs a target task, respectively, and the performance of task processing are calculated. Alternatively, the performance may be processing efficiency, accuracy, and the like.
In practical application, the evaluation mode and the evaluation index can be set according to the practical application scene, and the evaluation mode and the evaluation index are not limited herein.
S3022: and screening out the target equipment components according to the evaluation results of the equipment components.
In one embodiment, according to the evaluation result of each equipment component set, selecting a target equipment component set meeting the equipment component scheduling condition from each equipment component set, and determining the equipment components in the target equipment component set as target equipment components.
Specifically, according to each evaluation result, determining a corresponding score, and taking the device component set corresponding to the highest score as the target device component set. As one example, the evaluation index values may be normalized and weighted summed to obtain a score.
In practical application, the scheduling conditions of the equipment components can be determined according to the practical application scene, and the method is not limited.
As an example, a device component set with the best performance experience and the most power consumption can be selected as a target device component set, thereby improving the user experience.
Step 303: and generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component.
In one embodiment, when step 303 is performed, the following steps may be employed:
s3031: if the target equipment components are multiple, decomposing the target tasks to obtain subtasks corresponding to the target equipment components respectively.
S3032: and determining the operation parameters of each target equipment component according to the component resource information corresponding to each target equipment component.
As one example, the operating parameter may be a frequency bin of the channel bandwidth.
Further, because the corresponding evaluation results are different when the same equipment component is in different operation parameters, the same equipment component set can be evaluated for multiple times according to different operation parameters, multiple evaluation results corresponding to the same equipment component set and the operation parameters are obtained, and then the target equipment component set and the operation parameters corresponding to the target equipment component set can be determined according to the scores.
Further, whether the target task and the target equipment component set and the operation parameters which are set corresponding to the component resource information of at least one electronic equipment exist or not can be also inquired from the database, and if yes, the inquired target equipment component set and the inquired operation parameters can be directly obtained.
The method and the device can store the target task and the component resource information of at least one electronic device and the corresponding target device component set and operation parameters according to the historical scheduling information, and can pre-configure the corresponding target device component set and operation parameters aiming at various tasks and the component resource information of different electronic devices, so that the target device component set and operation parameters can be determined in a direct query mode, and the data processing efficiency is improved.
S3033: and respectively generating corresponding equipment component scheduling instructions according to the subtasks and the operation parameters respectively corresponding to the target equipment components.
Step 304: and sending a device component scheduling instruction to the target associated device corresponding to the target device component, so that the target associated device invokes the target device component to execute the device component scheduling instruction.
In one embodiment, when step 304 is performed, the following steps may be employed:
S3041: acquiring transmission capability information and transmission authority information of at least one encapsulation network of the target associated equipment; the encapsulation network is generated after encapsulating the radio frequency network.
In one embodiment, each radio frequency network in each electronic device and each control device is packaged in advance, so as to obtain a corresponding packaged network.
S3042: and selecting a target encapsulation network corresponding to the associated equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network.
The transmission capability information of different encapsulation networks can be the same or different, and the user can set the transmission authority of each encapsulation network according to the actual requirement.
As one example, the transmission capability information may be a transmission rate. The transmission authority may be a data type that allows transmission, user account information, and the like.
It should be noted that, data transmission (e.g., device component scheduling instructions) may be performed between different devices (including an electronic device and a control device) through the encapsulation network.
Therefore, the electronic equipment can select the packaging networks with different transmission capacities according to actual application scenes, the flexibility of data transmission is improved, and certain packaging network is allowed or forbidden according to user authorization setting, so that the safety of data transmission is improved.
S3043: and sending a device component scheduling instruction to the target associated device through the target encapsulation network of the target associated device.
Further, after the target associated device determines that the device component scheduling instruction is received, the subtasks are executed based on the device component scheduling instruction.
In one embodiment, the target associated device determines a target software layer corresponding to the device component scheduling instruction in the software stack; and calling a target device component corresponding to the device component scheduling instruction through a component calling interface of the target software layer, and executing the subtasks.
Specifically, when S3043 is executed, specific steps refer to the above steps 200-201, and are not described herein.
Thus, when a network (such as a local area network or a wide area network) exists between the devices, the user can schedule the target device components with better performance, power consumption and the like in the electronic devices to execute the target tasks which are difficult to be completed by the single electronic device or are difficult to be completed by the better performance. For example, a user's wearable terminal (e.g., a bracelet), schedules a processor of the user's mobile phone for data processing, and schedules a television of the user for data display.
Further, if it is determined that the device component scheduling condition is met, the electronic device may also call the device components of the plurality of electronic devices through the control device to execute the target task.
Referring now to FIG. 4, a flowchart of another method for scheduling device components for use in the task processing system of FIG. 1 is shown. The flow of the method is described below with reference to fig. 1 and 4.
Step 400: if the device component scheduling condition is met, the electronic device acquires transmission capability information and transmission authority information of at least one encapsulation network of the control device.
Step 401: and the electronic equipment selects a target encapsulation network corresponding to the control equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network.
Specifically, the steps 400 and 401 are executed specifically with reference to the step 304, which is not described herein.
Step 402: the electronic device sends a device component scheduling request for a target task to the control device through a target encapsulation network of the control device.
Step 403: and the control equipment calls a target equipment component in all equipment components of the associated equipment corresponding to the equipment component scheduling request to execute the target task based on the equipment component scheduling request.
In one embodiment, when performing step 403, the following steps may be employed:
s4031: and determining the associated equipment corresponding to the equipment component scheduling request.
S4032: and acquiring device component resource information of each device component of the associated device.
S4033: and screening out the target equipment components from the equipment components of the associated equipment according to the component resource information of the equipment components.
S4034: and generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component.
S4035: and sending a device component scheduling instruction to the target associated device corresponding to the target device component, so that the target associated device invokes the target device component to execute the device component scheduling instruction.
Specifically, when step 403 is executed, specific steps refer to steps 300-304, which are not described herein.
In the embodiment of the application, the calling of the equipment components is performed through the component calling interfaces of the software layers in the software stack, so that the adaptation problem caused by the difference of different equipment component models is avoided, the software layers can use the capacity of the equipment components, the hardware implementation of different manufacturers becomes transparent, and various application scenes can be automatically adapted; furthermore, based on the component resource information of each device component in the device, each device component is encoded to obtain the encoding tree of each device, so that each device component can be rapidly inquired through the encoding tree; moreover, the radio frequency network of each device is packaged, and a certain packaging network can be selected for communication according to actual demands, so that control information and data of each device component can be transmitted, a user can quickly, conveniently and safely use each device component resource supported by different software stacks of different electronic devices under the account information of a target user, experience of the user on the device component capacity of a plurality of devices is improved, near field communication control can be supported, cloud device cooperation (namely, scheduling of the device components is performed through a control device) can be supported, the electronic device with fewer resource functions can use the device components of other devices of the user to complete tasks which are difficult to complete by the electronic device, and deep expansion on the resource functions of the electronic device can be realized.
Based on the same inventive concept, the embodiments of the present application further provide a task processing device, and because the principle of the task processing device and the device for solving the problem are similar to that of a task processing method, the implementation of the device may refer to the implementation of the method, and the repetition is omitted. The device can be applied to electronic equipment.
Referring to fig. 5, a block diagram of an apparatus for task processing in an embodiment of the present application is shown. In some embodiments, an apparatus for task processing according to the present application includes:
a determining unit 501, configured to determine, when a task request for a target task is received, a target software layer corresponding to the task request in a software stack if it is determined that the task request meets an execution condition of a device component; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state;
the calling unit 502 is configured to call, through a component call interface of the target software layer, a target device component corresponding to the task request, and execute a target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component.
In an embodiment, the determining unit 501 is further configured to:
if the device component scheduling conditions are met, determining associated devices corresponding to the task requests; the scheduling condition of the equipment component is determined according to the communication state of the equipment network;
Acquiring component resource information of each device component of the associated device;
screening out target equipment components from all equipment components of the associated equipment according to the component resource information of all equipment components;
generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component;
and sending a device component scheduling instruction to the target associated device corresponding to the target device component, so that the target associated device invokes the target device component to execute the device component scheduling instruction.
In an embodiment, the determining unit 501 is further configured to:
acquiring target account information corresponding to the task request;
and determining the electronic equipment which is correspondingly set by the target account information as the associated equipment.
In an embodiment, the determining unit 501 is further configured to:
acquiring a coding tree of the associated equipment; the coding tree contains component resource information of each device component of the associated device;
and acquiring component resource information of each device component of the associated device according to the coding tree of the associated device.
In an embodiment, the determining unit 501 is further configured to:
evaluating each equipment component according to the component resource information of each equipment component;
and screening out the target equipment components according to the evaluation results of the equipment components.
In an embodiment, the determining unit 501 is further configured to:
if the target equipment components are multiple, decomposing the target tasks to obtain subtasks corresponding to the target equipment components respectively;
determining the operation parameters of each target equipment component according to the component resource information corresponding to each target equipment component;
and respectively generating corresponding equipment component scheduling instructions according to the subtasks and the operation parameters respectively corresponding to the target equipment components.
In an embodiment, the determining unit 501 is further configured to:
acquiring transmission capability information and transmission authority information of at least one encapsulation network of the target associated equipment; the encapsulation network is generated after the radio frequency network is encapsulated;
selecting a target encapsulation network corresponding to the associated equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling instruction to the target associated device through the target encapsulation network of the target associated device.
In an embodiment, the determining unit 501 is further configured to:
if the scheduling condition of the equipment component is met, acquiring transmission capability information and transmission authority information of at least one encapsulation network of the control equipment;
Selecting a target encapsulation network corresponding to the control equipment according to the transmission capability information and the transmission authority information of at least one encapsulation network;
and sending a device component scheduling request aiming at the target task to the control device through a target encapsulation network of the control device, so that the control device calls the target device component in all device components of the associated device corresponding to the device component scheduling request to execute the target task based on the device component scheduling request.
In one aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory storing computer instructions for causing a processor to perform the steps of the method provided in various alternative implementations of any of the task processing described above.
In one aspect, a storage medium is provided in an embodiment of the present application, where the storage medium stores computer instructions for causing a computer to perform the steps of a method provided in various alternative implementations of any of the task processing described above.
The task processing method in the embodiment of the application comprises the steps that when a task request aiming at a target task is received, if the task request meets the execution condition of a device component, a corresponding target software layer of the task request in a software stack is determined; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state; calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing a target task; corresponding component calling interfaces are respectively arranged in each software layer for each device component. Therefore, each software layer in the software stack can call the corresponding equipment component through the component call interface, so that the adaptation problem caused by the difference of different equipment components is avoided, and the application range of the equipment components is enlarged.
In an embodiment of the present application, an electronic device is provided, including:
a processor; and
and a memory storing computer instructions for causing the processor to perform the method of any of the embodiments described above.
In an embodiment of the present application, a storage medium is provided, where computer instructions are stored, where the computer instructions are configured to cause a computer to perform a method according to any of the foregoing embodiments. Fig. 6 shows a schematic structural diagram of an electronic device 6000. Referring to fig. 6, an electronic device 6000 includes: the processor 6010 and the memory 6020 may further include a power supply 6030, a display unit 6040, and an input unit 6050, as an option.
The processor 6010 is a control center of the electronic device 6000, connects respective components using various interfaces and lines, and performs various functions of the electronic device 6000 by running or executing software programs and/or data stored in the memory 6020, thereby performing overall monitoring of the electronic device 6000.
In the present embodiment, the processor 6010 executes the respective steps in the above embodiment when calling the computer program stored in the memory 6020.
Optionally, processor 6010 may include one or more processing units; preferably, the processor 6010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 6010. In some embodiments, the processor, memory, may be implemented on a single chip, and in some embodiments, they may be implemented separately on separate chips.
The memory 6020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, various applications, and the like; the storage data area may store data created according to the use of the electronic device 6000, and the like. In addition, memory 6020 may comprise high-speed random access memory and may also comprise non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device, and the like.
The electronic device 6000 also includes a power supply 6030 (e.g., a battery) for powering the various components, which may be logically connected to the processor 6010 by a power management system that performs functions such as managing charge, discharge, and power consumption.
The display unit 6040 may be used to display information input by a user or information provided to the user, various menus of the electronic device 6000, and the like, and in this embodiment of the present application, is mainly used to display a display interface of each application in the electronic device 6000, and objects such as text and pictures displayed in the display interface. The display unit 6040 may include a display panel 6041. The display panel 6041 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The input unit 6050 may be used to receive information such as numbers or characters input by a user. The input unit 6050 may include a touch panel 6051 and other input devices 6052. Wherein the touch panel 6051, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 6051 or thereabout using any suitable object or accessory such as a finger, stylus, etc.).
Specifically, the touch panel 6051 may detect a touch operation by a user, detect a signal caused by the touch operation, convert the signal into a touch point coordinate, send the touch point coordinate to the processor 6010, and receive and execute a command sent from the processor 6010. In addition, the touch panel 6051 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 6052 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, on-off keys, etc.), a trackball, mouse, joystick, etc.
Of course, the touch panel 6051 may cover the display panel 6041, and when the touch panel 6051 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 6010 to determine the type of the touch event, and then the processor 6010 provides a corresponding visual output on the display panel 6041 according to the type of the touch event. Although in fig. 6, the touch panel 6051 and the display panel 6041 are two independent components to realize the input and output functions of the electronic device 6000, in some embodiments, the touch panel 6051 and the display panel 6041 may be integrated to realize the input and output functions of the electronic device 6000.
The electronic device 6000 may also include one or more sensors, such as pressure sensors, gravitational acceleration sensors, proximity light sensors, and the like. Of course, the electronic device 6000 may also include other components such as a camera, as needed in a specific application, and these components are not shown in fig. 6 and will not be described in detail since they are not the components that are important in the embodiments of the present application.
It will be appreciated by those skilled in the art that fig. 6 is merely an example of an electronic device and is not meant to be limiting and that more or fewer components than shown may be included or certain components may be combined or different components.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
It should be apparent that the above embodiments are merely examples for clarity of illustration and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While nevertheless, obvious variations or modifications may be made to the embodiments described herein without departing from the scope of the invention.

Claims (11)

1. A method of task processing, the method comprising:
when a task request aiming at a target task is received, if the task request meets the execution condition of the equipment component, determining a corresponding target software layer of the task request in a software stack; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state;
calling a target device component corresponding to the task request through a component calling interface of the target software layer, and executing the target task; corresponding component calling interfaces are respectively arranged in each software layer aiming at each equipment component;
the calling, by the component calling interface of the target software layer, the target device component corresponding to the task request, and executing the target task, includes:
if the target equipment component corresponding to the task request is determined to be the equipment component in the target associated equipment, controlling the component call interface in the target associated equipment, calling the target equipment component of the task request in the target associated equipment, and executing the target task; the target associated equipment and the target equipment component are screened out according to component resource information of equipment components of the associated equipment corresponding to the task request; the component resource information is obtained from an encoding tree containing component resource information of each device component of each associated device.
2. The method of claim 1, wherein the invoking the task requests a target device component in the target associated device to perform the target task comprises:
if the equipment component scheduling conditions are met, determining associated equipment corresponding to the task request; the equipment component scheduling conditions are determined according to the equipment network communication state;
acquiring component resource information of each device component of the associated device;
screening out target equipment components from all equipment components of the associated equipment according to the component resource information of all equipment components;
generating a device component scheduling instruction corresponding to the target device component according to the target task and the target device component;
and sending the equipment component scheduling instruction to target associated equipment corresponding to the target equipment component, so that the target associated equipment calls the target equipment component to execute the equipment component scheduling instruction.
3. The method of claim 2, wherein the determining the associated device to which the task request corresponds comprises:
acquiring target account information corresponding to the task request;
And determining the electronic equipment which is correspondingly set by the target account information as the associated equipment.
4. The method of claim 2, wherein the obtaining component resource information for each device component of the associated device comprises:
acquiring a coding tree of the associated equipment; the coding tree contains component resource information of each device component of the associated device;
and acquiring component resource information of each device component of the associated device according to the coding tree of the associated device.
5. The method according to claim 2, wherein the screening the target device component from the device components of the associated device according to the component resource information of the device components includes:
evaluating each equipment component according to the component resource information of each equipment component;
and screening out the target equipment components according to the evaluation results of the equipment components.
6. The method according to claim 2, wherein the generating the device component scheduling instruction corresponding to the target device component according to the target task and the target device component includes:
if the target equipment components are multiple, decomposing the target tasks to obtain subtasks corresponding to the target equipment components respectively;
Determining the operation parameters of each target equipment component according to the component resource information corresponding to each target equipment component;
and respectively generating corresponding equipment component scheduling instructions according to the subtasks and the operation parameters respectively corresponding to the target equipment components.
7. The method according to any one of claims 2-6, wherein the sending the device component scheduling instruction to the target associated device corresponding to the target device component includes:
acquiring transmission capability information and transmission authority information of at least one encapsulation network of the target associated equipment; the encapsulation network is generated after the radio frequency network is encapsulated;
selecting a target encapsulation network corresponding to the associated equipment according to the transmission capability information and the transmission authority information of the at least one encapsulation network;
and sending the device component scheduling instruction to the target associated device through a target packaging network of the target associated device.
8. The method according to any one of claims 1-6, further comprising:
if the scheduling condition of the equipment component is met, acquiring transmission capability information and transmission authority information of at least one encapsulation network of the control equipment;
Selecting a target encapsulation network corresponding to the control equipment according to the transmission capability information and the transmission authority information of the at least one encapsulation network;
and sending a device component scheduling request aiming at the target task to the control device through a target encapsulation network of the control device, so that the control device calls a target device component in all device components of associated devices corresponding to the device component scheduling request to execute the target task based on the device component scheduling request.
9. An apparatus for task processing, the apparatus comprising:
the determining unit is used for determining a target software layer corresponding to the task request in the software stack if the task request for the target task is determined to be in accordance with the execution condition of the equipment component when the task request for the target task is received; the software stack comprises a plurality of software layers; the device component execution conditions are determined according to the device network communication state;
the calling unit is used for calling a target device component corresponding to the task request through a component calling interface of the target software layer and executing the target task; corresponding component calling interfaces are respectively arranged in each software layer aiming at each equipment component;
The calling unit is specifically configured to: if the target equipment component corresponding to the task request is determined to be the equipment component in the target associated equipment, controlling the component call interface in the target associated equipment, calling the target equipment component of the task request in the target associated equipment, and executing the target task; the target associated equipment and the target equipment component are screened out according to component resource information of equipment components of the associated equipment corresponding to the task request; the component resource information is obtained from an encoding tree containing component resource information of each device component of each associated device.
10. An electronic device, comprising:
a processor; and
memory storing computer instructions for causing the processor to perform the method according to any one of claims 1 to 8.
11. A storage medium having stored thereon computer instructions for causing a computer to perform the method according to any one of claims 1 to 8.
CN202311296745.2A 2023-10-08 2023-10-08 Task processing method and device, electronic equipment and storage medium Active CN117041353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311296745.2A CN117041353B (en) 2023-10-08 2023-10-08 Task processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311296745.2A CN117041353B (en) 2023-10-08 2023-10-08 Task processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117041353A CN117041353A (en) 2023-11-10
CN117041353B true CN117041353B (en) 2024-01-16

Family

ID=88635881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311296745.2A Active CN117041353B (en) 2023-10-08 2023-10-08 Task processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117041353B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391262A (en) * 2017-07-31 2017-11-24 李黎黎 A kind of job scheduling method and device
CN107688464A (en) * 2017-06-28 2018-02-13 上海壹账通金融科技有限公司 Software customized server, method and computer-readable recording medium
CN113656157A (en) * 2021-08-10 2021-11-16 北京锐安科技有限公司 Distributed task scheduling method and device, storage medium and electronic equipment
CN114168297A (en) * 2021-12-13 2022-03-11 杭州安恒信息技术股份有限公司 Method, device, equipment and medium for scheduling collection tasks

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7007103B2 (en) * 2002-04-30 2006-02-28 Microsoft Corporation Method to offload a network stack

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688464A (en) * 2017-06-28 2018-02-13 上海壹账通金融科技有限公司 Software customized server, method and computer-readable recording medium
CN107391262A (en) * 2017-07-31 2017-11-24 李黎黎 A kind of job scheduling method and device
CN113656157A (en) * 2021-08-10 2021-11-16 北京锐安科技有限公司 Distributed task scheduling method and device, storage medium and electronic equipment
CN114168297A (en) * 2021-12-13 2022-03-11 杭州安恒信息技术股份有限公司 Method, device, equipment and medium for scheduling collection tasks

Also Published As

Publication number Publication date
CN117041353A (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US20200084106A1 (en) Hybrid cloud integration fabric and ontology for integration of data, applications, and information technology infrastructure
US7409690B2 (en) Application module for managing interactions of distributed modality components
CN110221901A (en) Container asset creation method, apparatus, equipment and computer readable storage medium
US7747683B2 (en) Method and system for operating applications for remote terminal devices
CN108958729B (en) Data processing method, device and storage medium
CN110333917A (en) Data processing method, device, equipment and readable storage medium storing program for executing based on micro services
CN109697359A (en) A kind of message prompt method, device, storage medium and electronic equipment
CN107291744A (en) It is determined that and with the method and device of the relationship between application program
CN114090207A (en) Asynchronous task execution method
CN112243016A (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
CN114327087A (en) Input event processing method and device, electronic equipment and storage medium
CN111970162B (en) Heterogeneous GIS platform service central control system under super-integration framework
CN117041353B (en) Task processing method and device, electronic equipment and storage medium
CN109241727B (en) Permission setting method and device
CN111723163A (en) Information processing method, device and system
CN112448909A (en) Electronic lock management method, device, system and storage medium
CN111190731A (en) Cluster task scheduling system based on weight
CN117632460A (en) Load adjusting method and terminal equipment
CN113360916A (en) Risk detection method, device, equipment and medium for application programming interface
CN113835889A (en) Method for acquiring input event and related device
US10897463B2 (en) Managing and securing manageable resources in stateless web server architecture using servlet filters
CN116089924A (en) Method, device, computer equipment and storage medium for accessing permission data
CN117032940B (en) System, method and device for scheduling resources, electronic equipment and storage medium
KR20200082024A (en) Method for creating business screen and system for performing the same
CN114090123B (en) Method and device for configuring equipment parameters, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant