Control method and control system for multiple applications in the same device

By unifying application package name parameters and priority management, it solves the problem of rapid switching of camera and scanning engine hardware in Android PDA devices, realizes rapid switching and status sharing of applications in the device, and improves user experience and work efficiency.

CN114253692BActive Publication Date: 2024-10-18SHANGHAI SUMI TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111593041.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-18
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

In Android-based PDA devices, it is difficult to quickly switch between camera and code scanning engine hardware, which affects user experience and work efficiency. The existing technology relies on system broadcast scheduling and takes a long time, affecting the interactivity of applications.

Method used

By uniformly modifying the package name parameters of multiple applications, determining the idle status of the hardware pipeline when the device starts, and comparing priorities to determine the connection and disconnection of applications, rapid switching and status sharing between applications are achieved.

Benefits of technology

It improves the efficiency of fast switching of applications in the device, reduces waiting time, improves user experience and work efficiency, avoids the occurrence of black screen preview, and ensures efficient interaction between code scanning and camera applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253692B_ABST
    Figure CN114253692B_ABST
Patent Text Reader

Abstract

The present invention provides a control method and control system for multiple applications in the same device, which are suitable for controlling the connection or disconnection of multiple applications in the same device with a server. The control method includes the following steps: before starting to use the device, uniformly modifying the package name parameters of the multiple applications to a first package name parameter; after starting to use the device, starting any application of the multiple applications; and judging whether there are enough idle hardware pipes in the device, and when the judgment result is yes, enabling any application to connect to the server based on the first package name parameter. The control method and system of the present invention uniformly modify the package name parameters of multiple applications to the same package name parameter, and set the priority of different applications for specific scenarios, so as to achieve the effect of quickly switching applications on the same device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the field of application software control, and in particular to a control method and control system for multiple applications in the same device. Background Art

[0002] Currently, PDA (Personal Digital Assistant) products running Android system frequently use the camera hardware in the device to take photos and save them in the logistics and warehouse inventory scenes, and use the software decoding code scanning engine hardware to scan and identify the code. In order to ensure that the code scanning function is fast enough from pressing the code scanning key to the recognition result, the code scanning application is basically placed in the background, and when there is no camera application in use, the corresponding code scanning engine Camera ID will always be kept open.

[0003] The functions of taking photos with the camera and scanning codes with the code scanning engine are implemented based on the Google Camera API. Since Android's Camera Framework uses a C / S architecture, different camera classes and camera-derived applications belong to different C (Client), and different applications have different package names. When connecting to the Camera Service, you need to pass your own package name to the Service. After the server binds the C / S based on the package name information, it receives the parameters (Camera ID hardware description) passed from the C end and calls the S-end interface function to control the camera and code scanning engine hardware, thereby realizing the functions of taking photos and scanning codes. In the above scenario, applications with different package names will be frequently switched on the S end, and the resources of each application when binding to the server are private, and the state cannot be synchronized.

[0004] The current solution to the above problem is to check the usage of all Camera IDs through the method provided by the server to detect the hardware status of all Camera IDs before the camera application connects to the Camera Service. If the scanning hardware resources are already in use, it will sleep for a while, and send a system broadcast through the broadcast service provided by the system to notify the scanning application that occupies the resources to exit. After the waiting timeout, it will connect to the Camera Service to execute the next function. When the camera application exits, the system broadcast will notify the scanning application to start connecting to the service to open the corresponding Camera ID, so as to achieve the requirement of pressing the scan button to scan without using the camera.

[0005] The necessary conditions for the reliable operation of this solution need to rely on the reliability and real-time performance of the system broadcast scheduling, the speed of starting and exiting the camera and scanning engine, and the sum of the time consumption must not exceed the waiting time of low-priority applications. When the system runs more programs, the CPU load is too high, which causes the scheduling time to become longer. In addition, the broadcast operation is in simplex mode (one-way data transmission). When the occupied resource application is not completely exited, the new application starts to connect to the Camera Service after the waiting timeout, causing abnormal opening of the camera and affecting user functions. To solve this kind of problem, the waiting time is generally increased to optimize the problem instead of completely solving this kind of interaction problem. When the waiting time is too long, the preview screen will be black for a long time when the camera application is opened, affecting the user experience and work efficiency.

[0006] Therefore, how to quickly switch between applications with different functions (such as a code scanning application and a camera application) in the same device is a technical problem that needs to be solved urgently. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a control method and a control system for multiple applications in the same device which can quickly switch applications.

[0008] To solve the above technical problems, the present invention provides a control method for multiple applications in the same device, which is suitable for controlling the connection or disconnection of multiple applications in the same device with a server. Before starting to use the device, the package name parameters of the multiple applications are uniformly modified to a first package name parameter; after starting to use the device, any application of the multiple applications is started; and it is determined whether there are enough idle hardware pipes in the device. When the determination result is yes, any application is connected to the server based on the first package name parameter.

[0009] Optionally, after any one of the applications connects to the server based on the first package name parameter, the running status of any one of the applications is recorded and stored in the device.

[0010] Optionally, before starting to use the device, it also includes configuring priorities for the multiple applications, and after starting to use the device, it also includes, when the judgment result is no, comparing the priorities between the connected application and the application to be connected, if the priority of the application to be connected is higher than the priority of the connected application, exiting the connected application and making the application to be connected connect to the server based on the first package name parameter, otherwise refusing to connect the application to be connected.

[0011] Optionally, the multiple applications include a code scanning application and a camera application.

[0012] Optionally, the priority of the camera application is higher than the priority of the code scanning application.

[0013] Optionally, the control method as described in claim 1 further includes determining whether the available hardware pipes in the device are idle through a parameter file, and the parameter file includes the number of idle hardware pipes, the maximum data bandwidth of each hardware pipe and / or the total output data value of driving each application.

[0014] Optionally, when the number of idle hardware pipes is greater than or equal to 1 and any one application only needs to occupy one hardware pipe, the judgment result is yes, wherein, if the total output data value driving any one application is less than or equal to the maximum data bandwidth of each hardware pipe, it is determined that any one application only needs to occupy one hardware pipe.

[0015] The present invention also provides a control system for multiple applications in the same device, which is suitable for controlling the connection or disconnection of multiple applications in the same device with a server, including: a package name parameter setting module, configured to uniformly modify the package name parameters of the multiple applications to a first package name parameter before starting to use the device; an application switching strategy module, configured to determine whether there are sufficient idle hardware pipes in the device after starting to use the device and after starting any of the multiple applications, and when the determination result is yes, enable any of the applications to connect to the server based on the first package name parameter.

[0016] Optionally, the control system also includes a priority setting module, configured to configure priorities for the multiple applications before starting to use the device, and the application switching strategy module is further configured to compare the priorities between the connected application and the application to be connected after starting to use the device and when the judgment result is no, if the priority of the application to be connected is higher than the priority of the connected application, exit the connected application and enable the application to be connected to connect to the server based on the first package name parameter, otherwise refuse to connect to the application to be connected.

[0017] Optionally, the multiple applications include a code scanning application and a camera application, and the priority of the camera application is higher than the priority of the code scanning application.

[0018] The present invention also provides a control system for multiple applications in the same device, comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the control method described above.

[0019] The present invention also provides a computer readable medium storing computer program codes, wherein the computer program codes implement the control method described above when executed by a processor.

[0020] Compared with the prior art, the present invention has the following advantages: the present invention sets a unified package name parameter for different applications, and identifies the priority in a specific scenario, so that the fast switching of different applications in the same device can be realized. In particular, when the control method and control system of the present invention are applied to the switching scenario between the camera application and the code scanning application of the PDA product, the package names of different camera applications (including camera applications and code scanning applications) when connecting to the Camera Service (server) are integrated, so as to realize the state sharing of different applications to access different Camera IDs. The technical solution of the present invention is adopted to replace the broadcast and fixed delay methods in the prior art, so that the interaction problem between the code scanning and camera applications can be solved more efficiently and reliably. In addition, by measuring the hardware capabilities of the model and the capabilities of the code scanning engine and the camera device, different interaction schemes are used, especially on mid-to-high-end models (i.e., models and devices that can usually meet sufficient idle hardware pipelines) to achieve the effect of fast switching between the functions of the code scanning application and the camera application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are included to provide a further understanding of the present application. They are included and constitute a part of the present application. The accompanying drawings illustrate embodiments of the present application and together with the present specification serve to explain the principles of the present invention. In the accompanying drawings:

[0022] Figure 1 is an exemplary flow chart of a method for controlling multiple applications in a same device according to an embodiment of the present invention;

[0023] Figure 2 is an exemplary flow chart of a method for controlling multiple applications in a same device according to another embodiment of the present invention;

[0024] Figure 3 It is a framework diagram of a control system for multiple applications in the same device according to an embodiment of the present invention;

[0025] Figure 4 It is a framework diagram of a control system for multiple applications in the same device according to another embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0027] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0028] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values ​​of the parts and steps set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to those of ordinary skill in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be considered as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so that once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.

[0029] In the description of the present application, it should be understood that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present application; the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.

[0030] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used here to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used here are interpreted accordingly.

[0031] In addition, it should be noted that the use of words such as "first" and "second" to define components is only for the convenience of distinguishing the corresponding components. If not otherwise stated, the above words have no special meaning and cannot be understood as limiting the scope of protection of this application. In addition, although the terms used in this application are selected from well-known and commonly used terms, some terms mentioned in the specification of this application may be selected by the applicant at his or her discretion, and their detailed meanings are explained in the relevant parts of the description of this article. In addition, it is required to understand this application not only by the actual terms used, but also by the meaning implied by each term.

[0032] It should be understood that when a component is referred to as being "on another component," "connected to another component," "coupled to another component," or "contacting another component," it may be directly on, connected to, coupled to, or contacting the other component, or there may be intervening components. In contrast, when a component is referred to as being "directly on another component," "directly connected to," "directly coupled to," or "directly contacting" another component, there are no intervening components. Similarly, when a first component is referred to as being "electrically in contact with" or "electrically coupled to" a second component, there is an electrical path between the first component and the second component that allows current to flow. The electrical path may include capacitors, coupled inductors, and / or other components that allow current to flow, even without direct contact between conductive components.

[0033] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more operations may be removed from these processes.

[0034] Next, the present invention will be described through specific embodiments.

[0035] Figure 1 is an exemplary flow chart of a control method 10 for multiple applications in the same device (hereinafter referred to as "control method 10") according to an embodiment of the present invention, with reference to Figure 1 As shown, this embodiment includes the following steps.

[0036] Step S110 is to uniformly modify the package name parameters of multiple applications to the first package name parameters. In this embodiment, before starting to use the device, the package name parameters of multiple applications are uniformly modified to the first package name parameters. In some other embodiments of the present invention, before starting to use the device, step S110a is also included to configure the priorities of the above multiple applications. The details of the priorities that need to be configured will be described in detail below. Exemplarily, in one embodiment of the present invention, the device includes a PDA device.

[0037] Step S120 is to start any application among the multiple applications. Exemplarily, step S120 means starting any application among the multiple applications after starting to use the device.

[0038] Step S130 is to determine whether there are enough idle hardware pipelines. Figure 1 In the embodiment, after starting any application, it is determined whether there are enough idle hardware pipes in the device (such as a PDA device).

[0039] In one embodiment of the present invention, determining whether there are enough idle hardware pipelines in the device includes determining whether the available hardware pipelines in the device are idle through a parameter file, wherein the parameter file includes the number of idle hardware pipelines, the maximum data bandwidth of each hardware pipeline, and / or the total amount of output data driven by each application.

[0040] It is understandable that, in such an embodiment, the conclusion of determining whether there are enough idle hardware pipelines may vary depending on the actual values ​​of the parameters.

[0041] For example, in some embodiments of the present invention, whether there are enough idle hardware pipes is judged in the following manner: when the number of idle hardware pipes is greater than or equal to 1 and any application only needs to occupy one hardware pipe, it is determined that there are enough idle hardware pipes. Among them, if the total output data value of driving any application is less than or equal to the maximum data bandwidth of each hardware pipe, it is determined that any application only needs to occupy one hardware pipe. However, this method is only an example of one judgment method, and the present invention is not limited to this. For example, for some applications, the total output data value of driving each such application may be greater than the maximum data bandwidth of each hardware pipe, then the number of hardware pipes that each such application needs to occupy will be at least 2, and on this basis, it is compared with the number of idle hardware pipes to draw a correct judgment conclusion. For different applications, whether there are enough idle hardware pipes needs to be judged more comprehensively based on the above-mentioned various parameters.

[0042] Furthermore, step S140 is to connect to the server based on the first package name parameter. When step S130 determines that the device has enough idle hardware pipes, any application is connected to the server based on the first package name parameter.

[0043] Finally, step S150 is to record the running status of any of the above applications and store the running status in the device. In this embodiment, when any application connects to the server based on the first package name parameter, the running status of any application is recorded and stored in the device, so that the application running in the device can be considered and comprehensively judged when other applications are subsequently connected.

[0044] On the other hand, step S160 is to determine whether the priority of the connected application is higher than that of the application to be connected. In some embodiments of the present invention, when it is determined in step S130 that the device does not have enough idle hardware pipes, step S160 is executed to compare the priorities of the connected application and the application to be connected. If the priority of the connected application is higher than that of the application to be connected, step S180 is executed: refusing to connect the application to be connected and maintaining the connection between the connected application and the server.

[0045] Step S170: exit the connected application and enable the application to be connected to connect to the server based on the first package name parameter. In some embodiments of the present invention, if it is determined in step S160 that the priority of the connected application is lower than the priority of the application to be connected, then exit the connected application and enable the application to be connected to connect to the server based on the first package name parameter.

[0046] In order to further illustrate the control method of the present invention and its technical effects, a more detailed embodiment combined with a specific application scenario is given below.

[0047] Figure 22 is an exemplary flow chart of a control method 20 for multiple applications in the same device (hereinafter referred to as "control method 20") according to another embodiment of the present invention. In this embodiment, the device is specifically a PDA device that needs to frequently switch between a camera application and a code scanning application. Figure 2 As shown, this embodiment includes the following steps.

[0048] Step S210 is to uniformly modify the package name parameters of the camera application and the code scanning application to P_mix. In this embodiment, multiple applications are specifically implemented as a camera application and a code scanning application. The camera application and the code scanning application originally have independent and different package names, such as P_camera and P_scan. According to the technical solution of the present invention, step S210 unifies the package names of the two applications. It can be understood that the multiple application programs in the present invention are not limited to the above-mentioned applications, but may also include other applications. In particular, in this embodiment, the package name parameters of the camera application and the code scanning application are uniformly modified to the same package name parameter P_mix.

[0049] More specifically, the original package name parameter of the camera application is P_camera, and the original package name parameter of the code scanning application is P_scan. By implementing the management of the package name parameters of the camera application and the code scanning application in the Android Camera framework, they are uniformly modified to the same package name parameter P_mix. In this way, when the camera application and the code scanning application access different hardware resources at the same time, the camera service (Camera Service) can be made equivalent to the application accessing the camera (camera application) and the code scanning engine hardware (code scanning application) in the machine at the same time, so that the camera application can be started without waiting for the code scanning application to completely exit, and the two can achieve fast function switching.

[0050] It can be seen that the present invention converts the package names of different applications so that different applications can share the status when connecting to system services, thereby making it possible to respond quickly when switching connections between different applications.

[0051] Further references Figure 2 , step S220 is to configure the priority of the code scanning application to be a, and the priority of the camera application to be b, and b>a. In this embodiment, the user is allowed to customize the priorities of different applications according to actual needs. In particular, in this embodiment, for the code scanning application and the camera application, the priority of the code scanning application is a, and the priority of the camera application is b. Among them, the priority of the camera application is higher than the priority of the code scanning application, that is, b>a.

[0052] On this basis, step S230 is to start any application. Figure 2The specific implementation example is to start one of the camera application and the code scanning application. Further, step S240 is to determine whether there are enough idle hardware pipes. In one embodiment of the present invention, before determining whether there are enough idle hardware pipes, it is necessary to first check the SOC manual of the current device to see the number of idle hardware pipes supported by the device and the maximum data bandwidth supported by each idle hardware pipe, as well as the total output data value of the driver configuration camera and code scanning engine hardware in the device and store it in the machine in the form of a configuration file. Specifically, you can also refer to the above-mentioned Figure 1 The description will not be repeated here.

[0053] In this embodiment, the specific process of determining whether there are enough idle hardware pipelines in the device may include the following methods. For example, if any application in step S230 is a camera application, before the camera application attempts to connect to the camera server with the package name P_mix, it first determines whether there are idle hardware pipeline resources at present, and then obtains the data transmission volume of the device when working from the configuration file according to the hardware ID of the camera that the camera application is about to open, and compares it with the maximum data bandwidth of the idle hardware pipeline. If the data transmission volume is less than the data bandwidth of the hardware broadband, only one hardware pipeline resource is occupied. At this time, the camera application only needs to occupy one hardware pipeline; otherwise, it occupies at least two hardware pipelines. It can be understood that whether the camera application occupies one hardware pipeline or two hardware pipelines, if it is comprehensively determined that there are enough idle hardware pipelines in the device for the camera application to occupy, it is determined that there are enough idle hardware pipelines, that is, the judgment result of step S240 is yes.

[0054] For example, in this embodiment, when the number of idle hardware pipelines is greater than or equal to 1 and the camera application only needs to occupy one hardware pipeline, it is determined that there are enough idle hardware pipelines. If the total output data value of the driving camera application is less than or equal to the maximum data bandwidth of each hardware pipeline, it is determined that the camera application only needs to occupy one hardware pipeline; in some other embodiments of the present invention, when the number of idle hardware pipelines is greater than 2 and the camera application needs to occupy 2 hardware pipelines, it is also determined that there are enough idle hardware pipelines.

[0055] The present invention determines whether to directly occupy the idle hardware pipelines currently in use to meet the demand, or to solve the problem of insufficient idle pipeline hardware by ranking the priorities, by judging whether the device has enough idle hardware pipelines. In this way, fast switching of applications can be achieved on devices with different performances. In particular, for some mid-to-high-end devices, the idle hardware pipelines are usually sufficient for switching between camera applications and code scanning applications. Figure 2After the control method 20 shown in the figure, the judgment result of step S240 is yes. That is, no matter whether any application started in step S230 of the current process is a code scanning application or a camera application, step S260 can be executed to directly connect to the server (cameraservice) based on the unified package name parameter P_mix, so as to directly open the camera hardware to complete the code scanning or camera function. For example, the camera application can connect to the Camera Service to execute the Camera API method to open the camera hardware corresponding to its Camera ID. Therefore, for mid-to-high-end models, it is adopted Figure 2 The control method 20 can quickly and conveniently switch between the code scanning application and the camera application without having to wait for one application to exit before connecting to another application as in the prior art.

[0056] As described above, if it is determined in step S240 that the device has enough idle hardware pipes, step S250 is skipped and step S260 is directly executed. In some embodiments of the present invention, for devices that support multiple idle hardware pipes, since there are enough idle hardware pipes for multiple applications to use, the priority of the application does not need to be determined at this time. However, for other lower-end devices, since there are not enough idle hardware pipes, it is necessary to make decisions on whether different applications are connected or disconnected from the server based on the pre-set priorities.

[0057] Specifically, step S250 is to determine whether the application being connected is a camera application. If it is determined in step S240 that there are not enough idle hardware pipes in the device, it is necessary to decide whether to kick out other applications that are occupying the hardware pipes according to the priority set in step S220 to decide whether to connect a new application or refuse to connect a new application. Figure 2 In the illustrated embodiment, the priorities of the camera application and the code scanning application are pre-set in step S220. It is understandable that the priorities of the camera application and other applications may also be compared in other embodiments of the present invention.

[0058] If the judgment result of step S250 is yes, then step S260 is executed to connect the camera application to the Camera Service based on the package name parameter P_mix, and further turn on the camera hardware. If the judgment result of step S250 is no, then step S280 is executed to reject the connection. In this embodiment, the camera application is set to a high priority because the camera application also has a foreground interface for displaying preview images, and a third-party camera application is also installed in the machine. Such a high priority configuration can ensure its normal function. However, if the priorities of the camera application and the code scanning application are reversed, that is, the priority of the code scanning application is higher than that of the camera application, problems similar to those of the prior art will occur during use.

[0059] For example, when the user has opened the camera application in the device for preview and taking pictures, he accidentally clicks the physical scan button on the PDA device. At this time, if the camera hardware is forcibly closed, the camera application will report an error, causing device failure or failure. Only when the user has completed the disconnection of the camera application (such as manual disconnection), there is of course enough free hardware in the device. At this time, click the physical scan button on the PDA device to continue to use the scan function normally. This state will continue until the next time you need to connect the camera. Due to the priority setting, the scan function can be forced to exit, but it will not cause device failure, so that when the idle hardware pipeline resources in the device are limited, the scan application and the camera application can still be used normally, and the two can be easily switched.

[0060] at last, Figure 2 Step S290 is also shown, recording the running status of the camera application and storing the running status in the device. In this embodiment, after the camera application connects to the Camera Service, it also includes: recording the running status of the camera application and storing the running status in the device, for example, returning the callback status of methods such as openCamera and startPreview in the Camera Service to the camera application and updating the running status of the application. Among them, openCamera means turning on the camera hardware, and startPreview means starting the preview and waiting for image frame data.

[0061] It is understandable that, although it is mentioned above that for mid-to-high-end models, step S260 is usually directly executed, while for lower-end models, a specific strategy for whether to connect is usually determined by a pre-set comparison level, the present invention is not limited to this. For example, in some embodiments of the present invention, even for mid-to-high-end models, there may be a situation where there are not enough idle hardware pipes in the device when a new application needs to be connected again after multiple applications are opened. In this case, an optimized real-time solution for switching connections between different applications can still be performed through the pre-set priority. Therefore, the present invention is not limited to this. Figure 1 and Figure 2 The control method 10 and the control method 20 shown are global and relatively comprehensive solutions, and their applicable scenarios are not limited to a certain type of machine model equipment, and they have good versatility and scalability.

[0062] The present invention modifies the package names of different application programs into the same package name parameters and configures the priority settings of different applications, thereby enabling different application programs to share states when connecting to system services.

[0063] The present invention also provides a control system for multiple applications in the same device, and the system is also suitable for controlling the connection or disconnection of multiple applications in the same device with a server. Figure 3 is a framework diagram of a control system 300 (hereinafter referred to as "control system 300") for multiple applications in the same device according to an embodiment of the present invention, with reference to Figure 3 As shown, the control system 300 in this embodiment includes a package name parameter setting module 310 and an application switching policy module 320, wherein the parameter setting module 310 is configured to uniformly modify the package name parameters of multiple applications to a first package name parameter before starting to use the device; the application switching policy module 320 is configured to determine whether there are sufficient idle hardware pipes in the device after starting to use the device and after starting any application among the multiple applications, and when the judgment result is yes, enable any application to connect to the server based on the first package name parameter.

[0064] In an embodiment of the present invention, the control system 300 further includes a priority setting module 330 configured to configure priorities for multiple applications before starting to use the device.

[0065] In some other embodiments of the present invention, the application switching policy module 320 is further configured to compare the priorities of the connected application and the application to be connected after the device starts to be used and when the judgment result is no, if the priority of the application to be connected is higher than the priority of the connected application, exit the connected application and enable the application to be connected to connect to the server based on the first package name parameter, otherwise refuse to connect to the application to be connected.

[0066] For example, Figure 3 The control system 300 shown may be suitable for Figure 1 or Figure 2 Therefore, other details about the control system 300 can also refer to the above reference Figure 1 and Figure 2 The description will not be repeated here.

[0067] One embodiment of the present invention also provides a method as follows Figure 4 The control system 400 of multiple applications in the same device (hereinafter referred to as "control system 400") is shown. Figure 4 The control system 400 may include an internal communication bus 410, a processor 420, a read-only memory (ROM) 430, a random access memory (RAM) 440, and a communication port 450. When applied to a personal computer, the control system 400 may also include a hard disk 460.

[0068] Internal communication bus 410 can realize data communication between components of control system 400. Processor 420 can make judgments and issue prompts. In some embodiments, processor 420 can be composed of one or more processors. Communication port 450 can realize data communication between control system 400 and the outside. In some embodiments, control system 400 can send and receive information and data from the network through communication port 450.

[0069] The control system 400 may also include different forms of program storage units and data storage units, such as a hard disk 460, a read-only memory (ROM) 430 and a random access memory (RAM) 440, which can store various data files used for computer processing and / or communication, and possible program instructions executed by the processor 420. The processor executes these instructions to implement the main part of the method. The results processed by the processor are transmitted to the user device through the communication port and displayed on the user interface.

[0070] In addition, another aspect of the present invention further provides a computer-readable medium storing computer program codes, and the computer program codes implement the above-mentioned method for controlling multiple applications in the same device when executed by a processor.

[0071] The basic concepts have been described above. Obviously, for those skilled in the art, the above invention disclosure is only used as an example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.

[0072] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.

[0073] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).

[0074] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.

[0075] Similarly, it should be noted that in order to simplify the description of the disclosure of this application and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this application, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the object of this application are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0076] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

[0077] Although the present application has been described with reference to the current specific embodiments, ordinary technicians in this technical field should recognize that the above embodiments are only used to illustrate the present application, and various equivalent changes or substitutions may be made without departing from the spirit of the present application. Therefore, as long as the changes and modifications to the above embodiments are within the essential spirit of the present application, they will fall within the scope of the claims of the present application.

Claims

1. A method for controlling multiple applications in the same device, suitable for controlling the connection or disconnection of multiple applications with a server, wherein the multiple applications and the server are located in the same device, characterized in that: Before starting to use the device, uniformly modifying the package name parameters of the multiple applications to the first package name parameter; After starting to use the device, Launch any application among the multiple applications; as well as Determine whether there are enough idle hardware pipes in the device, and when the determination result is yes, enable any one of the applications to connect to the server based on the first package name parameter.

2. The control method according to claim 1, characterized in that: After any one of the applications connects to the server based on the first package name parameter, the running status of any one of the applications is recorded and stored in the device.

3. The control method according to claim 1 or 2, characterized in that: Before starting to use the device, it also includes configuring priorities for the multiple applications, and after starting to use the device, it also includes, when the judgment result is no, comparing the priorities between the connected application and the application to be connected, if the priority of the application to be connected is higher than the priority of the connected application, exiting the connected application and making the application to be connected connect to the server based on the first package name parameter, otherwise refusing to connect the application to be connected.

4. The control method according to claim 3, characterized in that: The multiple applications include a code scanning application and a camera application.

5. The control method according to claim 4, characterized in that: The priority of the camera application is higher than the priority of the code scanning application.

6. The control method according to claim 1, characterized in that: It also includes determining whether available hardware pipelines in the device are idle through a parameter file, wherein the parameter file includes the number of idle hardware pipelines, the maximum data bandwidth of each hardware pipeline and / or the total output data value of each application driven.

7. The control method according to claim 6, characterized in that: When the number of idle hardware pipelines is greater than or equal to 1 and any one application only needs to occupy one hardware pipeline, the judgment result is yes, wherein, if the total output data value driving any one application is less than or equal to the maximum data bandwidth of each hardware pipeline, it is determined that any one application only needs to occupy one hardware pipeline.

8. A control system for multiple applications in the same device, suitable for controlling the connection or disconnection of multiple applications with a server, wherein the multiple applications and the server are located in the same device, characterized in that: include: a package name parameter setting module, configured to uniformly modify the package name parameters of the plurality of applications to a first package name parameter before starting to use the device; The application switching strategy module is configured to determine whether there are sufficient idle hardware pipes in the device after the device begins to be used and any application among the multiple applications is started. When the judgment result is yes, any application is connected to the server based on the first package name parameter.

9. The control system according to claim 8, characterized in that: The system also includes a priority setting module, which is configured to configure priorities for the multiple applications before starting to use the device, and the application switching strategy module is further configured to compare the priorities between the connected application and the application to be connected after starting to use the device and when the judgment result is no, if the priority of the application to be connected is higher than the priority of the connected application, then exit the connected application and enable the application to be connected to connect to the server based on the first package name parameter, otherwise refuse to connect to the application to be connected.

10. The control system according to claim 9, characterized in that: The multiple applications include a code scanning application and a camera application, and the priority of the camera application is higher than the priority of the code scanning application.

11. A control system for multiple applications in the same device, comprising: a memory for storing instructions executable by a processor; and a processor, configured to execute the instructions to implement the method according to any one of claims 1 to 7.

12. A computer readable medium storing computer program code, wherein the computer program code, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Display equipment, and camera priority use control method and device

    CN112399232A

  • Method and device for sharing camera by multiple applications and computer readable storage medium

    CN112579322A

  • System and method for controlling selective operation of a service module installed in parallel with an application

    KR101920389B1

  • Electronic device comprising camera device

    WO2021230560A1