Method for realizing target function, electronic equipment and storage medium

By calling multi-platform common target tool components on mobile devices, the problem of the need to develop one platform on different platforms on mobile devices requires platform-by-platform development, and the development efficiency is improved.

CN119847511APending Publication Date: 2025-04-18CHINA TOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411794257.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

On mobile devices, the same function implemented for different platforms needs to be developed separately on each platform, resulting in duplication of development work and inefficient efficiency.

Method used

Provides a method to use the target function to complete the target function by obtaining operation instructions on a mobile device, calling a multi-platform common target tool component. The target tool component is called by a unified interface and is suitable for application and web platforms.

Benefits of technology

The goal function is achieved across platforms on different platforms, avoiding duplicate work of development by platform, and improving development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847511A_ABST
    Figure CN119847511A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing a target function, electronic equipment and a storage medium, and belongs to the field of computers. The method comprises the following steps: acquiring a first operation instruction under the condition that a first target object on the mobile equipment runs; calling a target tool component from a tool component library based on the first operation instruction; using the target tool assembly to complete a target function; wherein the target tool component is a general component on a plurality of different platforms, the target tool component is called by a uniform interface on the plurality of different platforms, and the plurality of different platforms comprise an application program platform and a webpage platform. The method and the device are used for cross-platform target function realization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computers, and specifically relates to a method, electronic device and storage medium for realizing a target function. Background Art

[0002] In recent years, with the popularity of mobile devices, software development for mobile devices has become more and more common.

[0003] Currently, there are often multiple platforms for users to operate on mobile devices. Related Technology During the development of mobile devices, the same function implemented on different platforms of the mobile device also needs to be developed and implemented separately on each platform, which will cause duplication of development work and lead to low development efficiency. Summary of the invention

[0004] The embodiments of the present application provide a method, an electronic device, and a storage medium for realizing a target function, which can solve the problem of repeated development work for the same function realized on different platforms in related technologies.

[0005] In a first aspect, an embodiment of the present application provides a method for achieving a target function, including: When the first target object on the mobile device is running, obtaining a first operation instruction; Based on the first operation instruction, calling a target tool component from a tool component library; Using the target tool component to complete the target function; The target tool component is a common component on multiple different platforms. The target tool component is called by a unified interface on the multiple different platforms. The multiple different platforms include an application platform and a web page platform.

[0006] In a second aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0007] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method described in the first aspect.

[0009] At least one of the above technical solutions provided in the embodiments of the present application can achieve the following technical effects: In an embodiment of the present application, when the first target object on the mobile device is running, a first operation instruction is obtained; based on the first operation instruction, a target tool component is called from a tool component library; and the target function is completed using the target tool component; wherein the target tool component is a component common to multiple different platforms, and the target tool component is called by a unified interface on the multiple different platforms, and the multiple different platforms include an application platform and a web page platform. In this way, by completing the target function using a target tool component that is common to multiple different platforms and called by a unified interface, it is possible to achieve the target function using this target tool component on different platforms, that is, to achieve the target function across platforms on a mobile device, without having to develop multiple different components for each platform to achieve the same target function, which solves the problem of repeated development work for the same function implemented on different platforms in related technologies and improves development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 is a flow chart of a method for achieving a target function provided by an embodiment of the present application; Figure 2 is a flowchart of another method for achieving the target function provided by an embodiment of the present application; Figure 3 It is a schematic diagram of an implementation environment provided by an embodiment of the present application; Figure 4 is a schematic diagram of another implementation environment provided by an embodiment of the present application; Figure 5 It is a structural block diagram of a device for realizing a target function provided by an embodiment of the present application; Figure 6 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0013] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0014] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0015] Componentization plays a vital role in modern software engineering. It fundamentally changes the way complex applications are built and maintained. In the long history of software development, as the scale of projects continues to expand, the complexity and coupling of the code also increase, which not only increases the difficulty of development, but also increases the maintenance cost. It is in this context that the concept of componentization came into being. It advocates decomposing large applications into a series of independent and reusable components. Each component focuses on a single function, has clear boundaries and interfaces, and can be independently developed, tested, and deployed.

[0016] The embodiment of the present application can extract the target functional components as common components to avoid duplicate construction. By expanding the mobile terminal cross-platform solution uniapp access, unifying the technology stack, and encapsulating uni components, more functions and interfaces can be reshaped on the mobile terminal, providing developers and users with a convenient operating experience, and building flexible technical components for the product to achieve cost reduction and efficiency improvement.

[0017] The method for realizing the target function provided by the embodiment of the present application is applied to a mobile device, and in particular, can be applied to a scenario covering a large number of business projects.

[0018] The method for implementing the target function provided in the embodiment of the present application can be executed by a mobile device, and the mobile device can be a mobile phone, a tablet, a laptop computer, etc.

[0019] The following is a detailed description of the method for achieving the target function provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0020] See also Figure 1 , Figure 1This is a flow chart of a method for achieving a target function provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps: Step 110: When the first target object on the mobile device is running, obtain a first operation instruction; Step 120: Based on the first operation instruction, call the target tool component from the tool component library; Step 130: using the target tool component to complete the target function; Wherein, the target tool component is a component common to multiple different platforms, and the target tool component is called by a unified interface on the multiple different platforms, and the multiple different platforms include an application platform and a web page platform. Wherein, the multiple different platforms can all be platforms on the mobile device, and the multiple platforms can run based on the same operating system on the mobile device. The multiple platforms in the embodiment of the present application can also run based on different operating systems.

[0021] In an embodiment of the present application, the first target object may be an application platform or a web platform. The target tool component may be a component used on this application platform or web platform. The target tool component is a reusable tool component. The target tool component may be a plug-in that depends on the application platform or web platform. In other words, when the application platform or web platform is run on a mobile device, the target tool component can be called to implement the target function. Among them, the target function is a function implemented using the target tool component. The target function may be a single function or a combination of multiple single functions. The target function may be customized as required.

[0022] In one embodiment of the present application, the target tool component may include any one of the following: a data cache processing component, a data encryption and decryption component, an altitude acquisition component, a binary file operation component, a string operation component, and a system information acquisition component.

[0023] Among them, the application platform in the embodiment of the present application can be an application platform installed on a mobile device, or it can be a small program platform that depends on large software installed on the mobile device, and this small program platform does not need to be installed separately on the mobile device. The web page platform in the embodiment of the present application can be a web page platform opened through a browser on a mobile device. In the embodiment of the present application, the application platform can be an application platform based on the Android operating system, and the web page platform can be a web page platform based on the Android operating system.

[0024] The first operation instruction may be an operation instruction triggered by a user. The first operation instruction is used to trigger the calling of the target tool component. For example, the user clicks a display control such as a button on the first target object to trigger the calling of the target tool component.

[0025] The tool component library in the embodiment of the present application is a component library for storing tool components. There may be at least one tool component in the tool component library. In one embodiment, there may be one tool component in the tool component library, for example, a data encryption tool component. In another embodiment, there may be multiple tool components in the tool component library, for example, a device system information acquisition tool component and a data encryption tool component.

[0026] In an embodiment of the present application, when the first target object on the mobile device is running, a first operation instruction is obtained; based on the first operation instruction, a target tool component is called from a tool component library; and the target function is completed using the target tool component; wherein the target tool component is a component common to multiple different platforms, and the target tool component is called by a unified interface on the multiple different platforms, and the multiple different platforms include an application platform and a web page platform. In this way, by completing the target function using a target tool component that is common to multiple different platforms and called by a unified interface, it is possible to achieve the target function using this target tool component on different platforms, that is, to achieve the target function across platforms on a mobile device, without having to develop multiple different components for each platform to achieve the same target function, which solves the problem of repeated development work for the same function implemented on different platforms in related technologies and improves development efficiency.

[0027] Figure 2 This is a flow chart of a method for achieving a target function provided by an embodiment of the present application. Figure 2 As shown, the method comprises the following steps: Step 210: When the first target object on the mobile device is running, obtain a first operation instruction; Step 220: Based on the first operation instruction, call the target tool component from the tool component library; Step 230: using the target tool component to complete the target function; Step 240: When the second target object on the mobile device is running, obtain a second operation instruction; Step 250: Based on the second operation instruction, calling the target tool component through the unified interface; Step 260: using the target tool component to complete the target function; The first target object is one of an application platform and a webpage platform, and the second target object is the other of the application platform and the webpage platform.

[0028] The target tool component is a common component on multiple different platforms. The target tool component is called by a unified interface on the multiple different platforms. The multiple different platforms include an application platform and a web page platform.

[0029] Among them, step 210 to step 260 can be executed by a mobile device. Moreover, it should be pointed out that step 210 to step 260 are not necessarily executed in sequence, for example, step 210 and step 240 can also be executed in parallel.

[0030] In an embodiment of the present application, the first operation instruction may be an operation instruction triggered by a user. The first operation instruction is used to trigger calling the target tool component based on the first target object. For example, the user may click a display control such as a button on the first target object to trigger calling the target tool component. The second operation instruction may be an operation instruction triggered by a user. The second operation instruction is used to trigger calling the target tool component by the second target object. For example, the user may click a display control such as a button on the second target object to trigger calling the target tool component.

[0031] In one embodiment of the present application, the application platform and the webpage platform are both obtained by using a cross-platform development framework for mobile terminals. In addition, the target tool component may be a component for a single function, and the target function may be a single function.

[0032] It is important to understand that Figure 1 and Figure 2 The contents in can be cross-referenced. Figure 2 Appearing in Figure 1 For the corresponding content, please refer to Figure 1 The discussion of this topic will not be elaborated here.

[0033] In the embodiment of the present application, when the first target object on the mobile device is running, the target function is completed through the target tool component, and when the second target object on the mobile device is running, the target function is also completed through the target tool component. In this way, by using the target tool component that is common to multiple different platforms and called by a unified interface to complete the target function, it is possible to use this target tool component to complete the target function on different platforms, that is, to achieve the target function across platforms on the mobile device, without having to develop multiple different components for each platform to achieve the same target function, which solves the problem of repeated development work for the same function implemented on different platforms in the related technology and improves development efficiency.

[0034] It is important to understand that in Figure 1 and Figure 2The target function component in the process of completing the target function can use the same calling method, the parameters used in the calling method are unified, and the data format used for the numerical values ​​of the parameters is the same. In this way, unified specifications are made from the three aspects of calling method, parameters and data format, which can further ensure that the target function component can be uniformly called on different platforms, further reducing duplication of development work and improving development efficiency. Moreover, in the embodiment of the present application, the names of the various parameters that play the same role can also be the same.

[0035] In one embodiment of the present application, the target tool component may include any one of the following: a data cache processing component, a data encryption and decryption component, an altitude acquisition component, a binary file operation component, a string operation component, and a system information acquisition component. Figure 3 As shown, Figure 3 Schematic diagram of the implementation environment provided by the embodiment of the present application. Figure 3 Several exemplary tool components in the tool component architecture are shown in . When a tool component is called, the corresponding function can be realized through the underlying capability SDK (Software Development Kit) and the processing result can be displayed.

[0036] Figure 4 It is a schematic diagram of another implementation environment provided by the application embodiment. Figure 4 exist Figure 3 On the basis of the above, various business applications are also displayed, such as office OA (Office Automation) applications. Figure 3 The business application in the embodiment of the present application may correspond to the first target object or the second target object, and the target tool component may be a plug-in integrated into the business application. When the target tool component is called through a unified API (Application Programming Interface), it can complete the corresponding function and feed back the processing result to the business application.

[0037] In addition, it should be understood that the target tool component in the embodiment of the present application can also be a custom tool component, and the target function implemented by the custom tool component is to support the extension function. In this way, it can be flexibly configured and extended according to the needs of different scenarios, which can further enrich the functions and application scope of the component library.

[0038] The application platform and webpage platform in the embodiment of the present application can be obtained by using a cross-platform development framework for mobile terminals. The cross-platform development framework is, for example, React Native, Flutter, etc.

[0039] In order to achieve uniform performance of components on different platforms, the embodiments of the present application can first abstract the platform differences, and by designing an intermediate layer or abstract layer, the specific implementation details of different platforms can be hidden, so that the components can run under a unified interface. This abstract technology helps to simplify the software development process and improve the reusability and maintainability of the code.

[0040] The embodiments of the present application support the reuse and expansion of components. By providing rich component properties and APIs, developers can flexibly configure and expand according to the needs of different scenarios. Supporting custom components and integrating them into the component library can further enrich the functions and scope of application of the component library.

[0041] In the embodiment of the present application, the mobile tool component library provides a unified interface method for developers to call the native functions of the device in different business scenarios. This method allows developers to use a common programming language (such as JavaScript) and a consistent API to access various hardware and software features of the device without having to deeply understand the specific implementation details of each function.

[0042] Mobile tool component libraries play a key role in cross-system consistency and development efficiency improvement, providing developers with a set of standardized operating procedures and functional sets to ensure consistency and smoothness of application experience across different operating systems. These component libraries simplify the development process by encapsulating complex underlying interaction logic, allowing developers to focus more on the implementation of core business logic rather than repetitive development.

[0043] By adopting this type of component library, code reuse can be achieved, redundant work can be reduced, and the component library can also be used to continuously update security patches and performance optimizations to ensure application stability and security. This improves development efficiency and ensures the consistency and maintainability of cross-platform applications.

[0044] In the embodiment of the present application, the mobile terminal tool component library may include components such as data cache processing, data encryption and decryption, obtaining altitude, binary file operation, string operation, and obtaining system information. The following is further discussed through a table.

[0045]

[0046] As can be seen from the above, in a large system, especially in a situation covering many business projects, overlapping functions and repeated development become common challenges. In this regard, adopting a componentization strategy to extract common functions into reusable components, such as data processing, equipment information acquisition, and the operation of two progress files, can greatly reduce the development burden. At the same time, build shared libraries and frameworks, unify business logic, and strengthen cross-project collaboration; supplemented by a microservice architecture, ensure that each service focuses on a single responsibility, which is easy to integrate and maintain. In addition, the automation of the continuous integration (CI) / continuous deployment (CD) process and the rigorous code review system ensure code quality and team efficiency. Combined with the agile development concept, rapid iteration and feedback loop can effectively avoid duplication of work, promote innovation and optimization, and ultimately achieve efficient use of development resources and comprehensive improvement of project quality.

[0047] Moreover, the embodiments of the present application standardize the implementation of the same function across projects, significantly improving development efficiency and resource utilization. Similar functions that were originally scattered across projects have been unified and optimized to form an intensive solution. This will effectively avoid duplication of work during later changes, significantly reduce maintenance costs, and release the potential of the development team, allowing it to focus on more strategic innovation tasks.

[0048] See also Figure 5 , Figure 5 is a structural block diagram of a device for realizing a target function provided by an embodiment of the present application. Figure 5 As shown, an embodiment of the present application provides a device 500 for implementing a target function, and the device 500 for implementing a target function includes: an acquisition module 510, a calling module 520 and an execution module 530.

[0049] An acquisition module 510 is used to acquire a first operation instruction when a first target object on a mobile device is running; A calling module 520, configured to call a target tool component from a tool component library based on the first operation instruction; An execution module 530 is used to complete a target function using the target tool component; The target tool component is a common component on multiple different platforms. The target tool component is called by a unified interface on the multiple different platforms. The multiple different platforms include an application platform and a web page platform.

[0050] In an embodiment of the present application, when the first target object on the mobile device is running, a first operation instruction is obtained; based on the first operation instruction, a target tool component is called from a tool component library; and the target function is completed using the target tool component; wherein the target tool component is a component common to multiple different platforms, and the target tool component is called by a unified interface on the multiple different platforms, and the multiple different platforms include an application platform and a web page platform. In this way, by using a target tool component that is common to multiple different platforms and called by a unified interface to complete the target function, it is possible to use this target tool component to complete the target function on different platforms without having to develop multiple different components for each platform to achieve the same target function, thereby solving the problem of repeated development work for the same function implemented on different platforms in related technologies and improving development efficiency.

[0051] The device for realizing the target function provided in the embodiment of the present application can realize each process realized in the above-mentioned method embodiment, and will not be described again here to avoid repetition.

[0052] like Figure 6 As shown, the embodiment of the present application also provides an electronic device 600. The electronic device 600 includes: a processor 610 and a memory 620, and the memory 620 stores a program or instruction, and the program or instruction is executed by the processor 610 to implement the steps of any of the methods described above. For example, when the program is executed by the processor 610, the following process is implemented: when the first target object on the mobile device is running, a first operation instruction is obtained; based on the first operation instruction, a target tool component is called from a tool component library; and the target function is completed using the target tool component; wherein the target tool component is a component common to multiple different platforms, and the target tool component is called by a unified interface on the multiple different platforms, and the multiple different platforms include an application platform and a web page platform. In this way, by using a target tool component that is common to multiple different platforms and called by a unified interface to complete the target function, it is possible to achieve the target function by using this target tool component on different platforms, without having to develop multiple different components on each platform to achieve the same target function, which solves the problem of repeated development work for the same function implemented on different platforms in the related technology, and improves development efficiency.

[0053] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of each embodiment of the method for implementing a cloud phone are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0054] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0055] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0056] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0057] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0059] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for achieving a target function, characterized in that: include: When the first target object on the mobile device is running, obtaining a first operation instruction; Based on the first operation instruction, calling a target tool component from a tool component library; Using the target tool component to complete the target function; The target tool component is a common component on multiple different platforms. The target tool component is called by a unified interface on the multiple different platforms. The multiple different platforms include an application platform and a web page platform.

2. The method according to claim 1, characterized in that After the target function is completed using the target tool, the method further includes: When the second target object on the mobile device is running, obtaining a second operation instruction; Based on the second operation instruction, calling the target tool component through the unified interface; Using the target tool component to complete the target function; The first target object is one of an application platform and a webpage platform, and the second target object is the other of the application platform and the webpage platform.

3. The method according to claim 2, characterized in that The application platform is an application platform based on the Android operating system, and the web platform is a web platform based on the Android operating system.

4. The method according to any one of claims 1 to 3, characterized in that: The target function component uses the same calling method in the process of completing the target function, the parameters used in the calling method are unified, and the data format used by the values ​​of the parameters is the same.

5. The method according to any one of claims 1 to 3, characterized in that: The application platform and the webpage platform are both obtained by using a cross-platform development framework for mobile terminals; the target tool component is a component for a single function, and the target function is a single function.

6. The method according to any one of claims 1 to 3, characterized in that: The target tool component is a custom tool component, and the target function implemented by the custom tool component is a function that supports extension.

7. The method according to any one of claims 1 to 3, characterized in that: The target tool component includes any one of the following: a data cache processing component, a data encryption and decryption component, an altitude acquisition component, a binary file operation component, a string operation component, and a system information acquisition component.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium, characterized in that: The medium stores a program or an instruction, and when the program or the instruction is executed, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.