Component deployment method, device and electronic device

By obtaining the processor architecture and component indication information of the device to be deployed, selecting the adapted operating system image and building the target operating system, the complex problem of component deployment on different CPUs and operating systems is solved, and efficient component adaptation and deployment is achieved.

CN114968275BActive Publication Date: 2025-09-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110194831.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-21
Publication Date
2025-09-30
Estimated Expiration
2041-02-21

AI Technical Summary

Technical Problem

When deploying components on different CPU architectures and operating systems, existing technologies need to be developed and adapted for each combination, resulting in high development complexity, large human resource requirements, and low adaptation and deployment efficiency.

Method used

By obtaining the processor architecture type and component indication information of the device to be deployed, selecting the adapted operating system image and building the target operating system, and then deploying the components in the operating system, the operating system management process is used to shield the influence of the native operating system and realize the unified deployment of components.

Benefits of technology

It reduces the complexity of development and component adaptation, reduces the workload of developers, and improves the portability and deployment efficiency of components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968275B_ABST
    Figure CN114968275B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a component deployment method, apparatus, and electronic device. The method, apparatus, and electronic device can obtain a first processor architecture type and first component indication information of a first device to be deployed, obtain a target operating system image adapted to the first processor architecture type from at least two preset operating system images based on the first processor architecture type, send the target operating system image to the first device to be deployed, trigger the first device to be deployed to run the target operating system image, build a target operating system, obtain a component to be deployed indicated by the first component indication information based on the first component indication information, and send the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system. Thus, the complexity of development and component adaptation is reduced, the workload of developers is reduced, and the adaptation efficiency and deployment efficiency of components are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud technology, and in particular to a component deployment method, device and electronic device. Background Art

[0002] With the rapid development of cloud technology and the progress of my country's independently developed hardware and operating systems, there will be strong demands in the government, enterprises, finance and other industries for cloud platforms to support a variety of independently controllable hardware and independently controllable operating systems.

[0003] Central processing units (CPUs) designed and manufactured by different manufacturers generally have different architectures and are incompatible with each other. While various commercial operating systems exist to mask these differences, different operating systems typically provide resources and services in different ways. This leads to inconsistent interfaces for these resources and services, resulting in poor portability of software or components developed on different operating systems.

[0004] Currently, the primary approach for deploying components on different CPU architectures and operating systems is for developers to develop and adapt components for each architecture and operating system separately. However, this approach increases the complexity of development and adaptation as the number of CPU and operating system types increases, increasing developer workload and human resource requirements while reducing component adaptation and deployment efficiency. Summary of the Invention

[0005] Embodiments of the present invention provide a component deployment method, device, and electronic device, which can reduce the difficulty of component adaptation in multi-CPU chip and multi-operating system scenarios and improve adaptation efficiency.

[0006] An embodiment of the present invention provides a component deployment method, including:

[0007] Obtaining a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed under a service platform;

[0008] Obtaining, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each of the operating system images is adapted to a processor architecture type, and the first to-be-deployed device, when running different operating system images, obtains the same operating system type;

[0009] Sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image and build the target operating system;

[0010] According to the first component indication information, the component to be deployed indicated by the first component indication information is obtained, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0011] Accordingly, an embodiment of the present invention further provides another component deployment method, including:

[0012] Receive a target operating system image and a type identifier of a processor architecture adapted by the target operating system image, sent by the service platform;

[0013] Based on the type identifier, determining a processor architecture type to which the target operating system image is adapted;

[0014] If the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed, the target operating system image is run to build the target operating system.

[0015] Receive the components to be deployed sent by the service platform, and deploy the components to be deployed in the target operating system.

[0016] Accordingly, an embodiment of the present invention further provides a component deployment device, which includes:

[0017] an information acquisition unit, configured to acquire a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed of the first device to be deployed on a service platform;

[0018] an image acquisition unit, configured to acquire, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each of the operating system images is adapted to a processor architecture type, and operating systems of the same type are obtained by running different operating system images on the first to-be-deployed device;

[0019] a system construction unit, configured to send the target operating system image to the first device to be deployed, trigger the first device to be deployed to run the target operating system image, and build the target operating system;

[0020] A component deployment unit is used to obtain the component to be deployed indicated by the first component indication information according to the first component indication information, and send the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0021] In an optional example, the component deployment device provided by an embodiment of the present invention further includes a process creation unit before the system construction unit, which is used to obtain management process configuration information and send the management process configuration information to the first device to be deployed, so that the first device to be deployed creates an operating system management process based on the management process configuration information, and the operating system management process is used to intercept information received by the first device to be deployed and forward the information sent by the service platform in the information to the target operating system;

[0022] Accordingly, the system construction unit can be used to send the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image based on the operating system management process after creating the operating system management process to build the target operating system.

[0023] In an optional example, a native operating system is installed in the first device to be deployed in an embodiment of the present invention, and the system construction unit can be used to send the target operating system image to the first device to be deployed, trigger the first device to be deployed to run the target operating system image to build the target operating system after creating the operating system management process, and obtain communication configuration information between the native operating system and the external device based on the operating system management process, and set target communication configuration information between the target operating system and the external device according to the communication configuration information;

[0024] receiving the target communication configuration information sent by the first device to be deployed, and setting the target communication configuration information as first communication configuration information of the first device to be deployed;

[0025] Correspondingly, the component deployment unit also includes an information forwarding unit, which is used to send component control information of the target component to the first device to be deployed based on the target communication configuration information, and trigger the operating system management process to forward the component control information to the target component of the target operating system.

[0026] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a first redeployment unit, configured to obtain deployed component information of the first device to be deployed and store the deployed component information, wherein the deployed component information includes a first processor architecture type of the first device to be deployed, an operating system image adapted for the first device to be deployed, and deployed components in the first device to be deployed;

[0027] Obtaining a second processor architecture type of a second device to be deployed, determining a first processor architecture type that is the same as the second processor architecture type based on the stored deployed information as the target first processor architecture type, and obtaining a second target operating system image adapted for the target first processor architecture type and deployed components corresponding to the target first processor architecture type based on the stored deployed information;

[0028] Sending the second target operating system image to the second device to be deployed, triggering the second device to be deployed to run the second target operating system image, and building the second target operating system in the second device to be deployed;

[0029] The deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0030] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a second redeployment unit, configured to obtain deployed component information of the first device to be deployed and store the deployed component information, wherein the second deployed component information includes a first processor architecture type of the first device to be deployed, a compiled operating system image file adapted for the first device to be deployed, and a compiled deployed component file in the first device to be deployed;

[0031] Obtaining a second processor architecture type and second component indication information of a second to-be-deployed device, and determining, based on the stored second deployed information, a first processor architecture type that is the same as the second processor architecture type as the target first processor architecture type, and determining a component type to be deployed that is indicated by the second component indication information as the target component type to be deployed;

[0032] Based on the stored second deployed information, obtaining a compiled file of a second target operating system image adapted to the target first processor architecture type and a compiled file of a deployed component corresponding to the target to-be-deployed component type;

[0033] Sending the compiled image file of the second target operating system to the second device to be deployed, triggering the second device to be deployed to run the compiled image file of the second target operating system, and building the second target operating system in the second device to be deployed;

[0034] The compiled file of the deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0035] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a component updating unit, configured to obtain a component version identifier of a deployed component in the first device to be deployed;

[0036] If the component version identifier is different from the latest component version identifier corresponding to the deployed component on the service platform, obtaining a component upgrade installation package of the deployed component based on the latest component version identifier;

[0037] The component upgrade installation package is sent to the first device to be deployed, triggering the first device to be deployed to monitor whether the deployed component is in use, and updating the deployed component based on the component upgrade installation package when the deployed component is not in use.

[0038] Accordingly, an embodiment of the present invention further provides a component deployment device, which includes:

[0039] An image acquisition unit, configured to receive a target operating system image and a type identifier of a processor architecture to which the target operating system image is adapted, sent by the service platform;

[0040] An architecture type determining unit, configured to determine a processor architecture type to which the target operating system image is adapted based on the type identifier;

[0041] a system construction unit, configured to run the target operating system image and build the target operating system if the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed;

[0042] The component deployment unit is configured to receive the components to be deployed sent by the service platform and deploy the components to be deployed in the target operating system.

[0043] In an optional example, the embodiment of the present invention further includes an instruction conversion unit, configured to receive a device resource management instruction sent by the service platform;

[0044] In the target operating system, according to the processor architecture type of the device to be deployed, the device resource management instruction is converted into a target device resource management instruction executable by the processor of the device to be deployed;

[0045] The target operating system calls the processor of the device to be deployed to execute the target device resource management instruction.

[0046] Correspondingly, an embodiment of the present invention also provides an electronic device, including a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to execute the steps in any component deployment method provided in an embodiment of the present invention.

[0047] In addition, an embodiment of the present invention further provides a storage medium storing a plurality of instructions suitable for loading by a processor to execute the steps in any component deployment method provided in an embodiment of the present invention.

[0048] By adopting the solution of the embodiment of the present invention, a first processor architecture type and first component indication information of a first device to be deployed can be obtained, where the first component indication information is used to indicate the components to be deployed of the first device to be deployed under the service platform. According to the first processor architecture type, a target operating system image adapted to the first processor architecture type is obtained from at least two preset operating system images, wherein each of the operating system images is adapted to a processor architecture type respectively, and the first device to be deployed obtains the same operating system type by running different operating system images. The target operating system image is sent to the first device to be deployed, triggering the first device to be deployed to run the target operating system image and build the target operating system. According to the first component indication information, the target operating system image indicated by the first component indication information is obtained. A deployment component is provided, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system; since in the related art, the component to be deployed needs to be developed for each processor architecture in the first device to be deployed and the operating system in the first device to be deployed, each operating system image in the preset operating system images in the embodiment of the present invention is adapted to a processor architecture type, and different operating system images correspond to the same operating system type. The component to be deployed only needs to be developed for each processor architecture and one operating system, which reduces the complexity of development and component adaptation, reduces the workload of developers, saves human resources, improves the portability of components, and improves the adaptation efficiency and deployment efficiency of components. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 This is a schematic diagram of a scenario of a component deployment method provided by an embodiment of the present invention;

[0051] Figure 2 This is a flow chart of a component deployment method provided by an embodiment of the present invention;

[0052] Figure 3is a flow chart of another component deployment method provided by an embodiment of the present invention;

[0053] Figure 4 is another flowchart of the component deployment method provided by an embodiment of the present invention;

[0054] Figure 5 This is a schematic diagram of the architecture of the first device to be deployed after component deployment is completed according to an embodiment of the present invention;

[0055] Figure 6 is a structural diagram of a component deployment device provided by an embodiment of the present invention;

[0056] Figure 7 is a structural diagram of another component deployment device provided by an embodiment of the present invention;

[0057] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0059] The embodiment of the present invention provides a component deployment method, apparatus, electronic device and storage medium. Specifically, the embodiment of the present invention provides a component deployment method applicable to the component deployment apparatus, which can be integrated into an electronic device.

[0060] The electronic device can be a terminal or other device, including but not limited to a mobile terminal and a fixed terminal. For example, a mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a laptop computer, a smart car terminal, etc., wherein a fixed terminal includes but is not limited to a desktop computer, a smart TV, etc.

[0061] The electronic device can also be a server or other device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.

[0062] The component deployment method of the embodiment of the present invention can be implemented by a server, or can be implemented by a terminal and a server together.

[0063] The following describes the method by taking the example of a terminal and a server jointly implementing the component deployment method.

[0064] like Figure 1 As shown, the component deployment system provided by an embodiment of the present invention includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 can be directly or indirectly connected through wired or wireless communication, and this application does not impose any restrictions here. Among them, the terminal 10 can exist as a terminal that needs to deploy the component to be deployed.

[0065] The terminal 10 may be a terminal to which a user requests component deployment, and is configured to send the first processor architecture type and first component indication information of the terminal 10 to the server 20 .

[0066] The server 20 can be used to obtain a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed under the service platform. Based on the first processor architecture type, a target operating system image adapted to the first processor architecture type is obtained from at least two preset operating system images, where each operating system image is adapted to a processor architecture type. The first device to be deployed obtains the same operating system type when running different operating system images. The target operating system image is sent to the first device to be deployed, triggering the first device to be deployed to run the target operating system image and build the target operating system. Based on the first component indication information, the component to be deployed indicated by the first component indication information is obtained, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0067] After the terminal 10 completes the deployment of the components to be deployed, the user can send service instructions to the server 20 based on the deployed components on the terminal 10. The server 20 provides the user with services such as cloud storage and cloud computing according to the instructions of the terminal 10.

[0068] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0069] The embodiment of the present invention will be described from the perspective of a component deployment device, which can be integrated into a server or a terminal.

[0070] like Figure 2 As shown, the specific process of the component deployment method of this embodiment can be as follows:

[0071] 201. Obtain a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed on a service platform.

[0072] The first processor architecture type may be used to represent the architecture type of the central processing unit (CPU) in the first device to be deployed. Current CPU architecture types include ARM, X86, X64, MIPS, and SW-64, depending on the design and manufacturer.

[0073] In one example, the service platform can be any form of platform, such as a webpage-based platform, a client-based platform, or a platform integrated into a client, etc. The service platform can provide users of the service platform with any form of services required by the users. For example, the service platform can be a music platform that provides users with services such as listening to music and identifying songs by listening. Alternatively, the service platform can be a cloud technology or cloud-developed service platform that provides users with services such as cloud storage and cloud computing.

[0074] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0075] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used flexibly and conveniently on demand. Cloud computing technology will become a key support. The backend services of technical network systems, such as video websites, image websites, and more portals, require extensive computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identification mark, which will need to be transmitted to the backend system for logical processing. Different levels of data will be processed separately. All kinds of industry data require strong system support, which can only be achieved through cloud computing.

[0076] In one example, the service platform can use components to present its various functions, such as cloud storage, cloud computing, etc., as independent products for users or developers to use in actual applications.

[0077] Components are self-contained, programmable, reusable, and language-independent software units that can be easily used to assemble applications. The first component indication information can be used to indicate the components to be deployed on the first device to be deployed. For example, the first component indication information can only indicate the components of the cloud technology platform used to provide cloud storage services, or can indicate the components of the cloud technology platform used to provide cloud storage services and the components used to provide cloud computing services.

[0078] In one example, the first processor architecture type and the first component indication information can be actively obtained from the first device to be deployed after the service platform determines the first device to be deployed on which the component needs to be deployed, or can be sent by the first device to be deployed to the service platform and obtained after being received by the service platform.

[0079] 202. According to the first processor architecture type, obtain a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each operating system image is adapted to a processor architecture type, and the first to-be-deployed device obtains the same operating system type when running different operating system images.

[0080] The pre-set operating system image is an image file developed by developers based on any commercial operating system such as Windows, CentOS, etc., or any independently developed and controllable operating system. Different operating system images are compatible with different processor architectures.

[0081] For example, the preset operating system image is based on the independently developed and controllable operating system t. The operating system images may include operating system image a adapted for the x86 architecture, operating system image b adapted for the ARM architecture, operating system image c adapted for the MIPS architecture, etc. The operating system type obtained by running operating system images a, b, and c can all be operating system t.

[0082] It is understandable that the CPU architecture and native operating system in different first devices to be deployed may be different. For example, the CPU architecture in the first device to be deployed A is X86, and the native operating system is Windows; the CPU architecture in the first device to be deployed B is ARM, and the native operating system is Centos; the CPU architecture in the first device to be deployed C is ARM, and the native operating system is Windows; the CPU architecture in the first device to be deployed D is X86, and the native operating system is Centos, and so on.

[0083] In related technologies, if you want to deploy components of the cloud technology platform for providing cloud storage services in the first devices A, B, C, and D to be deployed, you need to develop the following components for the cloud storage services: components adapted to the X86 architecture and Windows operating system, components adapted to the ARM architecture and Centos operating system, components adapted to the ARM architecture and Windows operating system, and components adapted to the X86 architecture and Centos operating system, which places a lot of workload on developers.

[0084] In this embodiment, if the components of the cloud technology platform for providing cloud storage services are to be deployed in the first devices A, B, C, and D to be deployed, it is only necessary to develop components adapted to the X86 architecture and the target operating system and components adapted to the ARM architecture and the target operating system for the cloud storage service, respectively. This reduces the complexity of development and component adaptation, reduces the workload of developers, and improves the adaptation efficiency and deployment efficiency of the components.

[0085] 203. Send the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image and build the target operating system.

[0086] In one example, when developing an operating system image, the developer can directly set the communication environment of the target operating system according to the CPU architecture and operating system to be adapted. Alternatively, in order to further avoid the influence of the native operating system in the device to be deployed, when developing the operating system image, the communication environment of the operating system is not set. Instead, a process is created in the first device to be deployed to directly communicate with the target operating system through configuration information, instructions, etc., to further shield the influence of the native operating system in the device to be deployed. Therefore, before step 203, the following may also be included:

[0087] Obtain management process configuration information and send the management process configuration information to the first device to be deployed, so that the first device to be deployed creates an operating system management process based on the management process configuration information. The operating system management process is used to intercept information received by the first device to be deployed and forward the information sent by the service platform in the information to the target operating system.

[0088] Among them, the management process configuration information can be in the form of an executable file or control instructions. The management process configuration information can include communication configuration parameters for the target operating system, driver parameters of the target operating system image, etc. After receiving the management process configuration information, the first device to be deployed can execute the management process configuration information and establish an operating system management process.

[0089] The operating system management process may send control information about components deployed in the target operating system generated by user operations on the service platform to the target operating system, and may also receive operation feedback information of the target operating system and send it to the service platform.

[0090] Optionally, if the target operating system image directly sets the communication-related parameters of the target operating system, the device to be deployed can directly obtain the target operating system without modifying the communication-related parameters after running the target operating system image; Figure 5 As shown, if the target operating system image does not have communication-related parameters set for the target operating system, it is necessary to set the communication-related parameters of the operating system when running the operating system image based on the operating system management process to obtain the target operating system. Therefore, the step of "sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image, and building the target operating system" may include:

[0091] The target operating system image is sent to the first device to be deployed, and the first device to be deployed is triggered to run the target operating system image based on the operating system management process after creating the operating system management process to build the target operating system.

[0092] The operating system management process can run in the device to be deployed for a long time, or it can run only when the target operating system is running.

[0093] In actual application, the operating system management process can intercept all information sent to the device to be deployed, and based on the intercepted information, send the information that needs to be sent to the target operating system to the target operating system, so that the target operating system can control the components deployed in the target operating system according to the received information to realize the services required by the user.

[0094] Optionally, the service platform can specifically set the target communication configuration information of the target operating system based on the actual needs of the user, for example, by setting the communication port of the specific target operating system through the relevant instructions of certain communication environment settings. Therefore, the first device to be deployed has a native operating system installed. The step of "sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to create an operating system management process, and then running the target operating system image based on the operating system management process to build the target operating system" includes:

[0095] Sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image to build the target operating system after creating the operating system management process, and obtaining communication configuration information between the native operating system and the external device based on the operating system management process, and setting target communication configuration information between the target operating system and the external device according to the communication configuration information;

[0096] Receive target communication configuration information sent by the first device to be deployed, and set the target communication configuration information as first communication configuration information of the first device to be deployed.

[0097] The communication configuration information may include an interface in the native operating system for communicating with the CPU in the first device to be deployed, an IP address of the first device to be deployed, and usage of a communication port of the first device to be deployed, etc.

[0098] After the communication configuration of the target operating system is completed, the operating system management process may generate target communication configuration information and send the target communication configuration information to the service platform through the communication port on the first device to be deployed.

[0099] After the service platform stores the target communication configuration information, when it is necessary to control the components in the target operating system, it can generate information to be sent to the target operating system based on the target communication configuration information and send it to the first device to be deployed. After the step of "obtaining the component to be deployed indicated by the first component indication information based on the first component indication information, and sending the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system", it can also include:

[0100] Based on the target communication configuration information, component control information of the target component is sent to the first device to be deployed, triggering the operating system management process to forward the component control information to the target component of the target operating system.

[0101] The target component is the component in the target operating system specifically pointed to by the component control information.

[0102] In one example, the component control information that needs to be sent to the target operating system may include a directed distribution identifier pointing to the target operating system. The operating system management process can send the information including the directed distribution identifier from all the received information to the target operating system, and send the information without the directed distribution identifier to the native operating system.

[0103] 204. According to the first component indication information, obtain the component to be deployed indicated by the first component indication information, and send the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0104] In actual application, the information of deployed components in the first device to be deployed may be stored. When the first device to be deployed needs to redeploy the components to be deployed, or when other first devices to be deployed of the same type need to deploy the components to be deployed, the components may be directly deployed in the first device to be deployed or other first devices to be deployed based on the information of deployed components. Therefore, after step 204, the following may be further included:

[0105] Obtaining deployed component information of the first device to be deployed and storing the deployed component information, where the deployed component information includes a first processor architecture type of the first device to be deployed, an operating system image adapted for the first device to be deployed, and an operating system image in the first device to be deployed;

[0106] Obtaining a second processor architecture type of the second device to be deployed, determining a first processor architecture type that is the same as the second processor architecture type based on the stored deployed information as the target first processor architecture type, and obtaining a second target operating system image adapted for the target first processor architecture type and deployed components corresponding to the target first processor architecture type based on the stored deployed information;

[0107] Sending the second target operating system image to the second device to be deployed, triggering the second device to be deployed to run the second target operating system image, and building the second target operating system in the second device to be deployed;

[0108] The deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0109] There may be multiple first devices to be deployed, and all devices that have undergone component deployment can become the first devices to be deployed.

[0110] The deployed component information may be in the form of an operating system image and a software package generated by the component to be deployed, or the deployed component information may only include the first processor architecture type, the operating system image, and an identifier or indication information of the operating system image, such as a name or an acquisition link, etc.

[0111] For example, a company needs to deploy a component to be deployed on 100 devices with the same processor architecture type. It can select one of the 100 devices as the first device to be deployed and the remaining 99 as the second devices to be deployed. When the first device to be deployed is deployed, the deployed component information of the first device to be deployed can be stored. The second device to be deployed can directly complete the deployment based on the deployed component information of the first device to be deployed, thereby improving component deployment efficiency.

[0112] In another example, with the development of Internet technology, the platform users are growing rapidly, and there may be a large number of second devices to be deployed that require component deployment. To improve the efficiency of component deployment, the corresponding deployed component information can be directly determined based on the second processor architecture type of the second device to be deployed and the component to be deployed. After step 204, the following may also be included:

[0113] Obtaining deployed component information of the first device to be deployed, and storing the deployed component information, wherein the second deployed component information includes a first processor architecture type of the first device to be deployed, a compiled operating system image file adapted for the first device to be deployed, and a compiled deployed component file in the first device to be deployed;

[0114] Obtaining a second processor architecture type and second component indication information of a second to-be-deployed device, and determining, based on the stored second deployed information, a first processor architecture type that is the same as the second processor architecture type as the target first processor architecture type, and determining a component type to be deployed that is indicated by the second component indication information as the target component type to be deployed;

[0115] Based on the stored second deployed information, obtaining a compiled file of a second target operating system image adapted to the target first processor architecture type and a compiled file of a deployed component corresponding to the target to-be-deployed component type;

[0116] Sending the compiled image file of the second target operating system to the second device to be deployed, triggering the second device to be deployed to run the compiled image file of the second target operating system, and building the second target operating system in the second device to be deployed;

[0117] The compiled file of the deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0118] The compiled image file of the second target operating system refers to an image file obtained by modifying the configuration parameters, file storage methods, etc. in the target operating system when the first device to be deployed deploys the component to be deployed in the target operating system, so that the component to be deployed can be installed and run normally in the target operating system.

[0119] The compiled file of the deployed component refers to a file obtained by modifying parameters, codes, etc. in the component to be deployed when the first device to be deployed deploys the component to be deployed in the target operating system, so that the component to be deployed can be installed and run normally in the target operating system.

[0120] It is understandable that with the development of computer technology, components are frequently updated and replaced. Each update will improve the original functions and add new features. Upgrading the component versions is inevitable. Therefore, the embodiments of the present invention may further include:

[0121] Obtaining a component version identifier of a deployed component in a first device to be deployed;

[0122] If the component version identifier is different from the latest component version identifier corresponding to the deployed component on the service platform, obtain the component upgrade installation package of the deployed component based on the latest component version identifier;

[0123] The component upgrade installation package is sent to the first device to be deployed, triggering the first device to be deployed to monitor whether the deployed component is in use, and updating the deployed component based on the component upgrade installation package when the deployed component is not in use.

[0124] The component version identifier can be in the form of "v1.1" or similar, indicating the version of the deployed component. The component upgrade installation package can include the complete component code or a storage link to the component update code. Upon receiving the storage link, the first device to be deployed can retrieve the upgrade component code corresponding to the deployed component from the storage address corresponding to the storage link.

[0125] As can be seen from the above, the embodiments of the present invention can reduce the complexity of development and component adaptation, reduce the workload of developers, save human resources, improve the portability of components, and improve the adaptation efficiency and deployment efficiency of components.

[0126] like Figure 3 As shown, an embodiment of the present invention provides another component deployment method for deploying components to be deployed. The specific process is as follows:

[0127] 301. Receive a target operating system image and a type identifier of a processor architecture compatible with the target operating system image, sent by a service platform.

[0128] The processor architecture type identifier may indicate the processor architecture type to which the target operating system image is adapted. The type identifier may be the name of the processor architecture type to which the target operating system image is adapted, or a character combination.

[0129] For example, if the processor architecture type identifier of operating system image a is 001, then the processor architecture type adapted by operating system image a is X86; if the processor architecture type identifier of operating system image b is 002, then the processor architecture type adapted by operating system image b is ARM, and so on.

[0130] 302. Based on the type identifier, determine the processor architecture type that the target operating system image is adapted to.

[0131] In one example, developers can pre-establish a mapping relationship between a type identifier and a processor architecture type. When the service platform sends the target operating system image, it can send the mapping relationship to the first device to be deployed, so that the first device to be deployed can determine the processor architecture type that is compatible with the target operating system image based on the type identifier.

[0132] 303. If the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed, run the target operating system image to build the target operating system.

[0133] In one example, if the processor architecture type adapted by the target operating system image is different from the processor architecture type of the first device to be deployed, the first device to be deployed can delete the received target operating system image and send an image sending error instruction to the service platform so that the service platform re-determines the target operating system image and sends it to the first device to be deployed.

[0134] In another example, the first device to be deployed may resend a deployment request to the service platform after deleting the received target operating system image, so that the service platform may return to execute step 201 according to the new deployment request.

[0135] Optionally, when developing an operating system image, the developer may directly set the communication environment of the target operating system according to the CPU architecture and operating system to be adapted. Alternatively, in order to further avoid the influence of the native operating system in the device to be deployed, the developer may not set the communication environment of the operating system when developing the operating system image. Instead, the developer may create a process in the first device to be deployed to directly communicate with the target operating system through configuration information, instructions, etc., to further shield the influence of the native operating system in the device to be deployed. Therefore, before step 303, the following steps may also be included:

[0136] Receive the management process configuration information sent by the service platform, and create an operating system management process based on the management process configuration information.

[0137] The operating system management process may send control information about components deployed in the target operating system generated by user operations on the service platform to the target operating system, and may also receive operation feedback information of the target operating system and send it to the service platform.

[0138] In an optional example, based on the operating system management process, communication-related parameters of the operating system may be set when running the operating system image to obtain the target operating system. That is, step 203 may include:

[0139] After the operating system management process is created, the target operating system image is run based on the operating system management process to build the target operating system.

[0140] In actual application, the operating system management process can intercept all information sent to the device to be deployed, and based on the intercepted information, send the information that needs to be sent to the target operating system to the target operating system, so that the target operating system can control the components deployed in the target operating system according to the received information to realize the services required by the user.

[0141] Optionally, the first device to be deployed may specifically set the communication port of the target operating system, etc. by receiving certain communication environment setting related instructions sent by the service platform. The step of "after creating the operating system management process, running the target operating system image based on the operating system management process to build the target operating system" may specifically include:

[0142] After creating the operating system management process, running the target operating system image to build the target operating system, and obtaining communication configuration information between the native operating system and the external device based on the operating system management process, and setting target communication configuration information between the target operating system and the external device according to the communication configuration information;

[0143] Send target communication configuration information to the service platform.

[0144] Among them, the component control information may include a targeted distribution identifier pointing to the target operating system. The operating system management process can send information including the targeted distribution identifier to the target operating system from all received information, and send information without the targeted distribution identifier to the native operating system.

[0145] Among them, when the target operating system calls the resources of the first device to be deployed, such as calling storage space and using computing resources, it can be achieved by operating the device file information in the target operating system. Therefore, after step 303, it also includes:

[0146] The device file information of the first device to be deployed is sent to the target operating system container through a preset component program interface.

[0147] The device file information represents the hardware resources of the first device to be deployed in the form of a file. Different hardware devices may correspond to different device file information. The device file information provides an interface between the external device and the target operating system, so that users can use the external device just like using ordinary files.

[0148] 304. Receive the components to be deployed sent by the service platform, and deploy the components to be deployed in the target operating system.

[0149] In actual application, when deploying a component to be deployed, you need to configure the required compilation environment for the component to be deployed in the target operating system. Only by compiling the component to be deployed in the compilation environment can the deployment of the component to be deployed be completed. Therefore, the step of "deploying the component to be deployed in the target operating system" includes:

[0150] In the target operating system, configure the compilation environment required for the components to be deployed;

[0151] Get the components to be deployed;

[0152] In the compilation environment, execute the components to be deployed, compile the components, and complete the deployment of the components.

[0153] Compilation is the process of converting a high-level language into a binary language that can be recognized by a computer. After the component is compiled, the first device to be deployed can implement the services provided by the service platform corresponding to the component.

[0154] In an optional example, the host operation and maintenance process of the first device to be deployed can be separated from the business operation and maintenance process of the components in the target operating system to facilitate maintenance by different operation and maintenance personnel. Therefore, after step 304, the following steps may be further included:

[0155] Sending component operation information in the target operating system to the component operation and maintenance platform through the component information monitoring interface preset in the target operating system, so that component operation and maintenance personnel can create component operation and maintenance instructions based on the component device information;

[0156] Receive component operation and maintenance instructions, and control components in the target operating system according to the component operation and maintenance instructions.

[0157] Send the hardware device information of the device where the component is to be deployed to the hardware operation and maintenance platform through the hardware information monitoring interface preset in the target operating system, so that the hardware operation and maintenance personnel can create hardware operation and maintenance instructions based on the hardware device information;

[0158] Receive hardware operation and maintenance instructions and control the hardware in the device to be deployed according to the hardware operation and maintenance instructions.

[0159] Optionally, with the development of computer technology, components are frequently updated and replaced. Each update will improve the original functions and add new features. Upgrading the component versions becomes inevitable. Therefore, the embodiment of the present invention may further include:

[0160] A component upgrade installation package is received, and whether the deployed component is in use is monitored; and when the deployed component is not in use, the deployed component is updated based on the component upgrade installation package.

[0161] The deployed component is not in use, which means that the deployed component does not occupy any resources in the first device to be deployed and is in a stopped state, or the deployed component is running in the background, but the user does not perform any operation on the deployed component, etc.

[0162] As can be seen from the above, the embodiments of the present invention can reduce the complexity of development and component adaptation, reduce the workload of developers, save human resources, improve the portability of components, and improve the adaptation efficiency and deployment efficiency of components.

[0163] The method described in the above embodiments will be further described in detail below with examples.

[0164] In this embodiment, the Figure 1 The system is described as follows, taking the first device to be deployed as a terminal and the service platform concentrated in the server as an example.

[0165] like Figure 4 As shown, the component deployment method of this embodiment may have the following specific process:

[0166] 401. The server obtains a first processor architecture type and first component indication information of a terminal.

[0167] The first processor architecture type may be the name of a processor architecture, such as X86, or may be an identifier indicating a processor architecture, such as 001 representing an X86 type processor architecture.

[0168] The first component indication information may be used to indicate a component to be deployed on the first device to be deployed under the service platform.

[0169] 402. According to the first processor architecture type, obtain a target operating system image adapted to the first processor architecture type from at least two preset operating system images.

[0170] The pre-defined operating system image is an image file developed by developers based on any commercial operating system, such as Windows or CentOS, or any independently developed and controllable operating system. Each operating system image is adapted for a specific processor architecture type. The first device to be deployed will generate the same operating system type when running different operating system images.

[0171] 403. The server obtains the components to be deployed and the management process configuration information indicated by the first component indication information, and sends the target operating system image, the type identifier of the processor architecture adapted by the target operating system image, the components to be deployed and the management process configuration information to the terminal.

[0172] In one example, the server may directly send the target operating system image file, type identifier, code file of the component to be deployed, and management process configuration information to the terminal at one time, or send them sequentially according to the deployment process of the terminal.

[0173] For example, the server first sends only the type identifier. After the terminal confirms that the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed, it receives the same type information sent by the terminal and then sends the target operating system image to the terminal, and so on.

[0174] 404. The terminal determines the processor architecture type to which the target operating system image is adapted based on the type identifier.

[0175] For example, if the processor architecture type identifier of operating system image a is 001, then the processor architecture type adapted by operating system image a is X86; if the processor architecture type identifier of operating system image b is 002, then the processor architecture type adapted by operating system image b is ARM, and so on.

[0176] In an example, the type identifier received by the terminal is 001, and it can be determined that the processor architecture type adapted by the target operating system image is X86.

[0177] 405. If the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed, the terminal creates an operating system management process based on the management process configuration information.

[0178] In one example, if the processor architecture type adapted by the target operating system image is different from the processor architecture type of the first device to be deployed, the first device to be deployed can delete the received target operating system image and send an image sending error instruction to the service platform so that the service platform re-determines the target operating system image and sends it to the first device to be deployed.

[0179] 406. After creating the operating system management process, the terminal runs the target operating system image based on the operating system management process to build the target operating system.

[0180] Among them, after creating the operating system management process, the terminal can run the target operating system image to build the target operating system, obtain the communication configuration information between the native operating system and the external device based on the operating system management process, and set the target communication configuration information between the target operating system and the external device according to the communication configuration information.

[0181] The terminal sends the target communication configuration information to the server. After the server receives the target communication configuration information, if it wants to operate the target component in the target operating system, it can send the component control information of the target component to the first device to be deployed based on the target communication configuration information, triggering the operating system management process to forward the component control information to the target component of the target operating system.

[0182] 407. The terminal deploys the components to be deployed in the target operating system based on the components to be deployed sent by the server.

[0183] In one example, the terminal configures the compilation environment required by the component to be deployed in the target operating system, and then executes the component to be deployed in the target operating system based on the compilation environment and the component to be deployed, compiles the component, and completes the deployment of the component.

[0184] As can be seen from the above, the embodiments of the present invention can reduce the complexity of development and component adaptation, reduce the workload of developers, save human resources, improve the portability of components, and improve the adaptation efficiency and deployment efficiency of components.

[0185] To better implement the above method, an embodiment of the present invention also provides a component deployment device. The component deployment device can be integrated into a server. The meanings of the terms herein are the same as those in the above component deployment method. For specific implementation details, please refer to the description in the method embodiment.

[0186] refer to Figure 6 , the device comprises:

[0187] An information acquisition unit 601 is configured to acquire a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed on the service platform.

[0188] An image acquisition unit 602 is configured to acquire, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each operating system image is adapted to a processor architecture type, and the first to-be-deployed device running different operating system images obtains the same operating system type;

[0189] The system construction unit 603 is configured to send the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image and build the target operating system;

[0190] The component deployment unit 604 is configured to obtain the component to be deployed indicated by the first component indication information according to the first component indication information, and send the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0191] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a process creation unit 605 before the system construction unit 603, which is used to obtain management process configuration information and send the management process configuration information to the first device to be deployed, so that the first device to be deployed creates an operating system management process based on the management process configuration information. The operating system management process is used to intercept information received by the first device to be deployed and forward information sent by the service platform in the information to the target operating system;

[0192] Accordingly, the system construction unit 603 may be configured to send the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image based on the operating system management process after creating the operating system management process to build the target operating system.

[0193] In an optional example, a native operating system is installed in the first device to be deployed in an embodiment of the present invention. The system construction unit 603 can be used to send the target operating system image to the first device to be deployed, trigger the first device to be deployed to run the target operating system image to build the target operating system after creating the operating system management process, and obtain communication configuration information between the native operating system and the external device based on the operating system management process, and set target communication configuration information between the target operating system and the external device according to the communication configuration information;

[0194] receiving target communication configuration information sent by the first device to be deployed, and setting the target communication configuration information as first communication configuration information of the first device to be deployed;

[0195] Correspondingly, the component deployment unit also includes an information forwarding unit 606, which is used to send component control information of the target component to the first device to be deployed based on the target communication configuration information, and trigger the operating system management process to forward the component control information to the target component of the target operating system.

[0196] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a first redeployment unit 607, configured to obtain deployed component information of the first device to be deployed and store the deployed component information, where the deployed component information includes a first processor architecture type of the first device to be deployed, an operating system image adapted for the first device to be deployed, and deployed components in the first device to be deployed;

[0197] Obtaining a second processor architecture type of the second device to be deployed, determining a first processor architecture type that is the same as the second processor architecture type based on the stored deployed information as the target first processor architecture type, and obtaining a second target operating system image adapted for the target first processor architecture type and deployed components corresponding to the target first processor architecture type based on the stored deployed information;

[0198] Sending the second target operating system image to the second device to be deployed, triggering the second device to be deployed to run the second target operating system image, and building the second target operating system in the second device to be deployed;

[0199] The deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0200] In an optional example, the component deployment apparatus provided by an embodiment of the present invention further includes a second redeployment unit 608, configured to obtain deployed component information of the first device to be deployed and store the deployed component information, wherein the second deployed component information includes the first processor architecture type of the first device to be deployed, a compiled operating system image file adapted for the first device to be deployed, and a compiled deployed component file in the first device to be deployed;

[0201] Obtaining a second processor architecture type and second component indication information of a second to-be-deployed device, and determining, based on the stored second deployed information, a first processor architecture type that is the same as the second processor architecture type as the target first processor architecture type, and determining a component type to be deployed that is indicated by the second component indication information as the target component type to be deployed;

[0202] Based on the stored second deployed information, obtaining a compiled file of a second target operating system image adapted to the target first processor architecture type and a compiled file of a deployed component corresponding to the target to-be-deployed component type;

[0203] Sending the compiled image file of the second target operating system to the second device to be deployed, triggering the second device to be deployed to run the compiled image file of the second target operating system, and building the second target operating system in the second device to be deployed;

[0204] The compiled file of the deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

[0205] In an optional example, the component deployment apparatus provided by the embodiment of the present invention further includes a component updating unit 609, configured to obtain a component version identifier of a deployed component in the first device to be deployed;

[0206] If the component version identifier is different from the latest component version identifier corresponding to the deployed component on the service platform, obtain the component upgrade installation package of the deployed component based on the latest component version identifier;

[0207] The component upgrade installation package is sent to the first device to be deployed, triggering the first device to be deployed to monitor whether the deployed component is in use, and updating the deployed component based on the component upgrade installation package when the deployed component is not in use.

[0208] In order to better implement the component deployment method provided in the embodiment of the present application, a component deployment device is also provided in one embodiment, which can be integrated into a terminal. The meanings of the terms are the same as those in the above-mentioned component deployment method, and the specific implementation details can be referred to the description in the method embodiment.

[0209] refer to Figure 7 , the device comprises:

[0210] The image acquisition unit 701 is configured to receive the target operating system image and the type identifier of the processor architecture to which the target operating system image is adapted, sent by the service platform;

[0211] An architecture type determining unit 702 is configured to determine a processor architecture type that the target operating system image is adapted to based on the type identifier;

[0212] The system construction unit 703 is configured to run the target operating system image and build the target operating system if the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed;

[0213] The component deployment unit 704 is configured to receive the components to be deployed sent by the service platform and deploy the components to be deployed in the target operating system.

[0214] In an optional example, the embodiment of the present invention further includes an instruction conversion unit 705, configured to receive a device resource management instruction sent by the service platform;

[0215] In the target operating system, according to the processor architecture type of the device to be deployed, the device resource management instruction is converted into a target device resource management instruction executable by the processor of the device to be deployed;

[0216] The target operating system calls the processor of the device to be deployed to execute the target device resource management instruction.

[0217] From the above, it can be seen that the component deployment device can reduce the complexity of development and component adaptation, reduce the workload of developers, save human resources, improve the portability of components, and improve the adaptation efficiency and deployment efficiency of components.

[0218] In addition, an embodiment of the present invention further provides an electronic device, which may be a terminal or a server, etc. Figure 8 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present invention, specifically:

[0219] The electronic device may include components such as a radio frequency (RF) circuit 801, a memory 802 including one or more computer-readable storage media, an input unit 803, a display unit 804, a sensor 805, an audio circuit 806, a wireless fidelity (WiFi) module 807, a processor 808 including one or more processing cores, and a power supply 809. It will be understood by those skilled in the art that Figure 8 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0220] The RF circuit 801 can be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink information from the base station and transmits it to one or more processors 808 for processing. It also transmits uplink data to the base station. Typically, the RF circuit 801 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, and the like. Furthermore, the RF circuit 801 can communicate with the network and other devices via wireless communication. Wireless communication can utilize any communication standard or protocol, including but not limited to Global System of Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).

[0221] Memory 802 can be used to store software programs and modules. Processor 808 executes various functional applications and data processing by running the software programs and modules stored in memory 802. Memory 802 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as sound playback or image playback); the data storage area may store data generated based on terminal usage (such as audio data and a phone book). Memory 802 may also include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 802 may also include a memory controller to provide access to memory 802 by processor 808 and input unit 803.

[0222] The input unit 803 can be used to receive digital or character input and generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control. Specifically, in one embodiment, the input unit 803 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or touchpad, can detect user touch operations on or near it (for example, operations performed on or near the touch-sensitive surface using a finger, stylus, or any other suitable object or accessory) and drive corresponding connected devices according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and detects signals generated by the touch operation, transmitting the signals to the touch controller. The touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then transmits it to the processor 808. The touch controller can also receive and execute commands from the processor 808. Furthermore, various types of touch-sensitive surfaces can be used, including resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface, the input unit 803 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0223] The display unit 804 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 804 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Furthermore, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 808 to determine the type of touch event. The processor 808 then provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 8 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.

[0224] The terminal may also include at least one sensor 805, such as a light sensor, a motion sensor, or other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel based on the brightness of the ambient light, and the proximity sensor can turn off the display panel and / or backlight when the terminal is moved to the ear. As a type of motion sensor, the gravity accelerometer can detect the magnitude of acceleration in all directions (generally three axes) and the magnitude and direction of gravity when stationary. This can be used for applications that recognize the phone's posture (such as switching between landscape and portrait modes, related games, and magnetometer posture calibration), vibration recognition-related functions (such as pedometers and tapping), etc. Other sensors that may be configured in the terminal, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., are not described here.

[0225] Audio circuit 806, a speaker, and a microphone provide an audio interface between the user and the terminal. Audio circuit 806 converts received audio data into electrical signals and transmits them to the speaker, which then converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 806 and converted into audio data. The audio data is then processed by output processor 808 and transmitted via RF circuit 801 to, for example, another terminal. Alternatively, the audio data can be output to memory 802 for further processing. Audio circuit 806 may also include an earphone jack to allow communication between an external headset and the terminal.

[0226] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages and access streaming media through the WiFi module 807. It provides users with wireless broadband Internet access. Figure 8 The WiFi module 807 is shown, but it is understandable that it is not an essential component of the terminal and can be omitted as needed without changing the essence of the invention.

[0227] Processor 808 is the terminal's control center, connecting all components of the phone using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 802 and accessing data stored in memory 802, it executes various terminal functions and processes data, thereby providing overall monitoring of the phone. Optionally, processor 808 may include one or more processing cores; preferably, processor 808 may integrate an application processor and a modem processor, with the application processor primarily handling the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 808.

[0228] The terminal also includes a power supply 809 (e.g., a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 808 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 809 can also include any of one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other components.

[0229] Although not shown, the terminal may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 808 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 802 according to the following instructions, and the processor 808 will run the applications stored in the memory 802 to implement various functions as follows:

[0230] Obtaining a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed under the service platform;

[0231] Obtaining, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each operating system image is adapted to a processor architecture type, and the first to-be-deployed device running different operating system images obtains the same operating system type;

[0232] Sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image, and building the target operating system in the device to be deployed;

[0233] According to the first component indication information, the component to be deployed indicated by the first component indication information is obtained, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0234] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0235] To this end, an embodiment of the present invention provides a storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any component deployment method provided in an embodiment of the present invention. For example, the instructions can execute the following steps:

[0236] Obtaining a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed under the service platform;

[0237] Obtaining, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each operating system image is adapted to a processor architecture type, and the first to-be-deployed device running different operating system images obtains the same operating system type;

[0238] Sending the target operating system image to the first device to be deployed, triggering the first device to be deployed to run the target operating system image, and building the target operating system in the device to be deployed;

[0239] According to the first component indication information, the component to be deployed indicated by the first component indication information is obtained, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

[0240] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0241] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0242] Since the instructions stored in the storage medium can execute the steps in any component deployment method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any component deployment method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0243] According to one aspect of the present application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the above embodiments.

[0244] The above is a detailed introduction to a component deployment method, device, electronic device and storage medium provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A component deployment method, characterized in that: include: Obtaining a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed on the first device to be deployed under a service platform; Obtaining, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each of the operating system images is adapted to a processor architecture type, and the first to-be-deployed device, when running different operating system images, obtains the same operating system type; Obtaining management process configuration information, and sending the management process configuration information to the first device to be deployed, so that the first device to be deployed creates an operating system management process based on the management process configuration information, the operating system management process being used to intercept information received by the first device to be deployed and forward information sent by the service platform in the information to the target operating system; sending the target operating system image to the first device to be deployed, and running the target operating system image based on the operating system management process to build the target operating system; According to the first component indication information, the component to be deployed indicated by the first component indication information is obtained, and the component to be deployed is sent to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

2. The method according to claim 1, characterized in that A native operating system is installed in the first device to be deployed; The sending the target operating system image to the first to-be-deployed device, running the target operating system image based on the operating system management process, and building the target operating system includes: Sending the target operating system image to the first device to be deployed, running the target operating system image to build a target operating system, and obtaining communication configuration information between the native operating system and the external device based on the operating system management process, and setting target communication configuration information between the target operating system and the external device according to the communication configuration information; receiving the target communication configuration information sent by the first device to be deployed, and setting the target communication configuration information as first communication configuration information of the first device to be deployed; The method further includes: acquiring, according to the first component indication information, a component to be deployed indicated by the first component indication information, and sending the component to be deployed to the first device to be deployed, so that after the first device to be deployed builds the target operating system and deploys the component to be deployed in the target operating system, Based on the target communication configuration information, component control information of the target component is sent to the first device to be deployed, triggering the operating system management process to forward the component control information to the target component of the target operating system.

3. The method according to any one of claims 1-2, characterized in that After acquiring the to-be-deployed component indicated by the first component indication information according to the first component indication information, and sending the to-be-deployed component to the first to-be-deployed device, the method further includes: Obtaining deployed component information of the first device to be deployed, and storing the deployed component information, wherein the deployed component information includes a first processor architecture type of the first device to be deployed, an operating system image adapted for the first device to be deployed, and deployed components in the first device to be deployed; Obtaining a second processor architecture type of a second device to be deployed, determining a first processor architecture type that is the same as the second processor architecture type based on the stored deployed information as the target first processor architecture type, and obtaining a second target operating system image adapted for the target first processor architecture type and deployed components corresponding to the target first processor architecture type based on the stored deployed information; Sending the second target operating system image to the second device to be deployed, triggering the second device to be deployed to run the second target operating system image, and building the second target operating system in the second device to be deployed; The deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

4. The method according to any one of claims 1 to 2, characterized in that After acquiring the to-be-deployed component indicated by the first component indication information according to the first component indication information, and sending the to-be-deployed component to the first to-be-deployed device, the method further includes: Obtaining deployed component information of the first device to be deployed, and storing the deployed component information, wherein the second deployed component information includes a first processor architecture type of the first device to be deployed, a compiled operating system image file adapted for the first device to be deployed, and a compiled file of the deployed component in the first device to be deployed; Obtaining a second processor architecture type and second component indication information of a second to-be-deployed device, and determining, based on the stored second deployed information, a first processor architecture type that is the same as the second processor architecture type as the target first processor architecture type, and determining a component type to be deployed that is indicated by the second component indication information as the target component type to be deployed; Based on the stored second deployed information, obtaining a compiled file of a second target operating system image adapted to the target first processor architecture type and a compiled file of a deployed component corresponding to the target to-be-deployed component type; Sending the compiled image file of the second target operating system to the second device to be deployed, triggering the second device to be deployed to run the compiled image file of the second target operating system, and building the second target operating system in the second device to be deployed; The compiled file of the deployed component is sent to the second device to be deployed, so that the second device to be deployed deploys the deployed component in the second target operating system.

5. The method according to claim 1, wherein Also includes: Obtaining a component version identifier of a deployed component in the first device to be deployed; If the component version identifier is different from the latest component version identifier corresponding to the deployed component on the service platform, obtaining a component upgrade installation package of the deployed component based on the latest component version identifier; The component upgrade installation package is sent to the first device to be deployed, triggering the first device to be deployed to monitor whether the deployed component is in use, and updating the deployed component based on the component upgrade installation package when the deployed component is not in use.

6. The method according to claim 1, characterized in that Applied to the first device to be deployed, including: Receive a target operating system image and a type identifier of a processor architecture adapted by the target operating system image, sent by the service platform; Based on the type identifier, determining a processor architecture type to which the target operating system image is adapted; If the processor architecture type adapted by the target operating system image is the same as the processor architecture type of the first device to be deployed, running the target operating system image to build the target operating system; Receive the components to be deployed sent by the service platform, and deploy the components to be deployed in the target operating system.

7. The method according to claim 6, characterized in that Also includes: Receiving a device resource management instruction sent by the service platform; In the target operating system, according to the processor architecture type of the device to be deployed, the device resource management instruction is converted into a target device resource management instruction executable by the processor of the device to be deployed; The target operating system calls the processor of the device to be deployed to execute the target device resource management instruction.

8. A component deployment device, characterized in that: include: an information acquisition unit, configured to acquire a first processor architecture type and first component indication information of a first device to be deployed, where the first component indication information is used to indicate a component to be deployed of the first device to be deployed on a service platform; an image acquisition unit, configured to acquire, based on the first processor architecture type, a target operating system image adapted to the first processor architecture type from at least two preset operating system images, wherein each of the operating system images is adapted to a processor architecture type, and operating systems of the same type are obtained by running different operating system images on the first to-be-deployed device; The system construction unit is configured to obtain management process configuration information and send the management process configuration information to the first device to be deployed, so that the first device to be deployed creates an operating system management process based on the management process configuration information, the operating system management process is configured to intercept information received by the first device to be deployed and forward the information sent by the service platform in the information to the target operating system; send the target operating system image to the first device to be deployed, run the target operating system image based on the operating system management process, and build the target operating system; A component deployment unit is used to obtain the component to be deployed indicated by the first component indication information according to the first component indication information, and send the component to be deployed to the first device to be deployed, so that the first device to be deployed deploys the component to be deployed in the target operating system after building the target operating system.

9. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the component deployment method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • High-speed storage system and high-speed storage method based on heterogeneous hardware platform

    CN104598333A

  • OpenStack containerization system and method based on a domestic platform

    CN109871213A

  • Micro-service deployment method and device of hybrid architecture

    CN111124430A