CN113392393B - Floating authorization method and device of solver and electronic equipment - Google Patents

Floating authorization method and device of solver and electronic equipment Download PDF

Info

Publication number
CN113392393B
CN113392393B CN202110714611.2A CN202110714611A CN113392393B CN 113392393 B CN113392393 B CN 113392393B CN 202110714611 A CN202110714611 A CN 202110714611A CN 113392393 B CN113392393 B CN 113392393B
Authority
CN
China
Prior art keywords
file
solver
virtual environment
authorization
floating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110714611.2A
Other languages
Chinese (zh)
Other versions
CN113392393A (en
Inventor
王劲松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shanshu Network Technology Co ltd
Shanshu Science And Technology Suzhou Co ltd
Shanshu Science And Technology Beijing Co ltd
Shenzhen Shanzhi Technology Co Ltd
Original Assignee
Shanghai Shanshu Network Technology Co ltd
Shanshu Science And Technology Suzhou Co ltd
Shanshu Science And Technology Beijing Co ltd
Shenzhen Shanzhi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shanshu Network Technology Co ltd, Shanshu Science And Technology Suzhou Co ltd, Shanshu Science And Technology Beijing Co ltd, Shenzhen Shanzhi Technology Co Ltd filed Critical Shanghai Shanshu Network Technology Co ltd
Priority to CN202110714611.2A priority Critical patent/CN113392393B/en
Publication of CN113392393A publication Critical patent/CN113392393A/en
Application granted granted Critical
Publication of CN113392393B publication Critical patent/CN113392393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a floating authorization method of a solver, which comprises the steps of establishing and activating a virtual environment; installing an interface of the solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment; after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file; setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system. The floating authorization method of the solver provided by the invention can effectively improve the operation and maintenance efficiency and reduce the operation and maintenance pressure.

Description

Floating authorization method and device of solver and electronic equipment
Technical Field
The invention relates to the technical field of big data, in particular to a floating authorization method and device of a solver and electronic equipment.
Background
With the rapid development of the big data technology, a solver matched with the big data technology is rapidly developed, the solver is an efficient mathematical programming solver suite aiming at a large-scale optimization problem, and can provide a solution scheme of various mathematical programming such as a linear programming problem, an integer programming problem and a non-linear problem for a client. However, the solver usually requires authorization, which usually includes a stand-alone authorization and a floating authorization, wherein the stand-alone authorization is installation and authorization on a single machine, the floating authorization is that one machine is used as an authorization server, and the rest multiple machines (according to the number of purchased tokens) queue to obtain authorization through network requests, wherein N is an integer not less than 2.
In the prior art, a solver itself cannot be called by a large database framework, for example, the solver does not support Spark call and needs to be installed on a used machine, in an actual application process, a Spark cluster is often large in scale, a large cluster may have thousands of nodes, and if a COPT solver is to be installed on all the node machines, the operation and maintenance pressure is very high.
Disclosure of Invention
The embodiment of the invention provides a floating authorization method and device of a solver and electronic equipment, which can effectively improve the operation and maintenance efficiency and reduce the operation and maintenance pressure.
A first aspect of an embodiment of the present invention provides a floating authorization method for a solver, where the method includes:
creating and activating a virtual environment;
installing an interface of a solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment, wherein the authorization server is provided with authorization permissions of the solver and the solver;
after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file;
setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
Optionally, the creating and activating a virtual environment includes:
and creating and activating a python virtual environment in the authorization server, wherein the authorization server is a linux server, and the floating authorization file of the solver is installed in a directory where an executable file of the authorization server is located.
Optionally, the installing the interface of the solver into the virtual environment includes:
and decompressing the installation package of the solver, acquiring the python interface of the solver from the decompressed solver file, and installing the python interface into the virtual environment.
Optionally, the copying the dynamic link library file of the solver to the virtual environment includes:
and acquiring the dynamic link library from the decompressed solver file, and copying the dynamic link library to a dynamic library file in the virtual environment.
Optionally, before writing the compressed file and the configuration file of the floating authorization to the distributed file system, the method further includes:
and acquiring the configuration file of the floating authorization, wherein the configuration file comprises the IP address of the authorization server and the external open interface of the authorization server.
Optionally, the setting the compressed file and the configuration file of the floating authorization in a distributed file system includes:
placing the compressed file into the distributed file system, and writing the configuration file into the distributed file system.
A second aspect of the embodiments of the present invention further provides a floating authorization apparatus for a solver, where the apparatus includes:
an activation unit for creating and activating a virtual environment;
the installation unit is used for installing an interface of a solver into the virtual environment and copying a dynamic link library file of the solver into the virtual environment, wherein the authorization server is provided with authorization permissions of the solver and the solver;
the compression unit is used for compressing the file of the virtual environment after copying the dynamic link library file to the virtual environment to obtain a compressed file;
and the setting unit is used for setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
Optionally, the activation unit is configured to create and activate a python virtual environment in the authorization server, where the authorization server is a linux server, and the floating authorization file of the solver is installed in a directory where an executable file of the authorization server is located.
A third aspect of an embodiment of the present invention provides an electronic device, including a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by one or more processors to execute operation instructions included in the one or more programs for performing a floating authorization method of a solver according to the first aspect.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps corresponding to the floating authorization method of the solver provided in the first aspect.
The above one or at least one technical solution in the embodiments of the present application has at least the following technical effects:
based on the technical scheme, the virtual environment is created and activated; installing an interface of the solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment; after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file; the compressed file and the configuration file of the floating authorization are arranged in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system, in this way, the interface and the dynamic link library of the solver are arranged in the virtual environment, the compressed file and the configuration file of the virtual environment are arranged in the distributed file system, and the path of the configuration file and the path of the virtual environment are sent to each node, so that each node can access the virtual environment, and therefore each node can access the virtual environment in the authorization server to obtain the authorization, and in this way, each node in the distributed file system can effectively finish obtaining the authorization of the solver by accessing the virtual environment without installing the solver on each node and operating and maintaining each solver, only the operation and maintenance of the authorization server are needed, and the nodes needing the operation and maintenance are effectively reduced, so that the operation and maintenance efficiency can be effectively improved, and the operation and maintenance pressure is reduced.
Drawings
Fig. 1 is a schematic method diagram of a floating authorization method of a solver according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a floating authorization method of a solver according to an embodiment of the present disclosure;
FIG. 3 is a block diagram of a floating authorization apparatus of a solver according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The main implementation principle, the specific implementation mode and the corresponding beneficial effects of the technical scheme of the embodiment of the present application are explained in detail with reference to the accompanying drawings.
Examples
Referring to fig. 1, an embodiment of the present application provides a floating authorization method for a solver, which is applied to a server, and the method includes:
s101, creating and activating a virtual environment;
s102, installing an interface of a solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment, wherein an authorization server is provided with authorization permissions of the solver and the solver;
s103, after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file;
s104, setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
In step S101, a virtual environment may be created and activated in any one machine, for example, a virtual environment may be created and activated on any one node in the distributed file system, a virtual environment may also be created and activated on one machine connected to the authorization server, and a virtual environment may also be created and activated in the authorization server.
In a specific implementation process, the authorization server may be a linux server or a unix server, and a solver is installed in the authorization server, and the solver may be a COPT solver, which is an efficient mathematical programming solver suite for large-scale optimization problems, and can provide solutions for various mathematical programming such as linear programming problems, integer programming problems, and nonlinear problems for clients. However, the solver usually requires authorization, which usually includes a stand-alone authorization and a floating authorization, wherein the stand-alone authorization is installation and authorization on a single machine, the floating authorization is that one machine is used as an authorization server, and the rest N machines (according to the number of purchased tokens) queue to obtain authorization through network requests, wherein N is an integer not less than 2.
Specifically, if the authorization server is a linux server, a python virtual environment can be created in the authorization server and activated, and the floating authorization file of the solver is installed in the directory where the executable file of the authorization server is located. When the floating authorization file is installed in the directory where the executable file of the authorization server is located, the copt _ flserver may be input at the terminal of the authorization server, and the authorization server is further started.
In the practical application process, taking an authorization server as a linux server as an example, a linux server needs to be prepared for use as the authorization server, and a COPT solver is installed on the linux server and obtains a license with floating authorization. Assuming that the following configuration pieces are made on the machine, i.e. Port is a Port opened by floating grant, all nodes in the distributed file system that need to use a COPT solver need to communicate with the machine and the Port, license is a path for reading a certificate, and the code is specifically as follows:
[Main]
Port=7979
[Licensing]
LicenseFile=license.dat
PubkeyFile=license.key。
in turn, the authorization server is configured such that each node in the distributed file system communicates with the authorization server through a port of 7979. Among them, the distributed file system generally employs a Spark framework.
In the embodiment of the present specification, Spark is a mainstream large data processing framework, and large-scale data is processed in a cluster form through a master + slave management mode.
And, after the floating authorization license of the solver is installed in the authorization server and the above configuration is completed, a python virtual environment named copt _ env can be created by using the conda to execute the conda create-n copt _ env, and then the conda activate copt _ env is executed to activate the virtual environment. Of course, other ways of creating a python virtual environment and then activating the created python virtual environment may be used.
After the virtual environment is activated, step S102 is performed.
In step S102, the installation package of the solver may be first obtained, then the installation package of the solver is decompressed, a decompressed solver file is obtained, then the python interface of the solver is obtained from the decompressed solver file, and the python interface is installed in the virtual environment. Of course, the python interface can also be directly obtained from the installation file of the solver and installed in the virtual environment.
In this embodiment of the present specification, since the authorization server needs to perform floating authorization on a node in the distributed file system, the authorization server needs to install a solver and a floating authorization of the solver.
Specifically, if the installation package of the solver is a COPT installation package, the COPT installation package may be decompressed, the lib/python/setup.py is found in the decompressed folder, the python setup.py install may be executed, and the python interface of the COPT may be installed in the python virtual environment.
Specifically, after the decompressed solver file is obtained, all dynamic link library files required by the operation of the solver are obtained from the decompressed solver file, and all the obtained dynamic link library files are used as dynamic link library files of the solver, and then the dynamic link library files of the solver are copied to the dynamic library files of the virtual environment. Of course, all the dynamic link library files required by the operation of the solver can also be directly obtained from the installation files of the solver, and then all the obtained dynamic link library files are copied into the virtual environment.
For example, taking COPT as an example, in a COPT installation package, four dynamic link library files, namely libcopt.so, libcopt _ cpp.so, libcoptcswrap.so and libcoptjniwrrap.so, are located under a lib folder, and are copied into a lib file of a virtual environment, the bottom layer of the COPT is implemented by C + +, and the 4 dynamic link libraries need to be found during operation to be operated, so that the four dynamic link library files are added into the lib file of the virtual environment, and the COPT can be operated in the virtual environment; and installing the python interface of the solver into the virtual environment, so that the nodes in the distributed file system are accessed to the virtual environment through the python interface.
After copying the dynamic link library file to the virtual environment, step S103 is performed.
In step S103, after the interface of the solver is installed in the virtual environment and the dynamic link library file of the solver is copied to the virtual environment, the file in which the virtual environment is located is compressed to obtain a compressed file.
For example, taking COPT as an example, installing a python interface of COPT into a python virtual environment, and copying four dynamic link library files, namely libcopt.so, libcopt _ cpp.so, libcoptcswap.so and libcoptjniwrap.so, below a lib folder in the COPT into a lib file of the python virtual environment; at the moment, the file where the python virtual environment is located is compressed into a ZIP compression package, the transmission data can be reduced by compressing the python virtual environment, and the transmission efficiency is improved.
After the compressed file is obtained, step S104 is performed.
In step S104, the compressed file may be placed into the distributed file system, and the obtained configuration file of the floating authorization may be written into the distributed file system.
Specifically, after obtaining the compressed file, a configuration file of the floating authorization may be obtained, where the configuration file includes an IP address of the authorization server and an externally open interface of the authorization server, and of course, the configuration file may further include obtaining a longest waiting time of the authorization, and the specific codes are as follows:
Host=192.168.1.11
Port=7979
QueueTime=600。
the Host is an IP address of the authorization server, the Port is an externally open Port of the authorization server, and the queue time is the waiting time for obtaining the authorization.
In this embodiment of the present specification, a virtual environment is installed in the authorization server, a solver is run in the virtual environment, and the authorization server is installed with a floating authorization permission, so that when each node in the distributed file system acquires a floating authorization of the solver, it needs to communicate with the virtual environment of the authorization server through the virtual environment of each node to acquire the floating authorization of the solver of the authorization server.
Specifically, the compressed file may be first put into the distributed file system, and the compressed file is decompressed in the distributed file system, so that the distributed file system obtains the virtual environment; and after obtaining the configuration file of the floating authority, the distributed file system is capable of sending the virtual environment and the configuration file to each node in the distributed file system, thereby enabling each node to communicate with the virtual environment in the authorization server through the virtual environment and the configuration file, since the solver is run in the virtual environment in the authorization server, and the authorization server has a floating authorization permission, so that each node can be authorized in turn by the floating authorization permission of the authorization server, while it is communicating with the virtual environment in the authorization server, so that each node can use the solver, and a solver does not need to be installed on each node and the operation and maintenance are carried out on each solver, and only an authorization server needs to be operated and maintained, so that the nodes needing to be operated and maintained are effectively reduced, the operation and maintenance efficiency is effectively improved, and the operation and maintenance pressure is reduced.
Specifically, taking the example that the Spark framework is adopted by the distributed file system, the distributed file system sends the virtual environment and the configuration file to each node in the distributed file system through a pre-distribution mechanism of the Spark framework during running, and a parameter for pointing to the virtual environment needs to be set in the Spark submit script, so that the accuracy of communication between each node and the virtual environment of the authorization server is higher.
For example, when sending the virtual environment and the configuration file to each node in the distributed file system through the pre-distribution mechanism of the Spark framework, the following parameters need to be specified in the Spark submit script, and the COPT can be used on the whole cluster by normally submitting the task.
--files hdfs:///client.ini
--confspark.yarn.dist.archives=hdfs:///copt_env.zip#pyenv
--confspark.yarn.appMasterEnv.PYSPARK_PYTHON=pyenv/bin/python
--confspark.yarn.appMasterEnv.PYSPARK_DRIVER_PYTHON=pyenv/bin/python。
The files parameter specifies to distribute client.ini to each running node, spark.yarn.dist.archives specifies the hdfs path of the PYTHON virtual environment package, yarn can be automatically distributed during running, alias after # is equivalent to alias, spark.yarn.appmasterenv is set with two environment variables, and PYSPARK _ PYTHON and PYSPARK _ DRIVER _ PYTHON respectively point the PYTHON interpreters in Spark Master and Work nodes to the packed PYTHON environment.
In this embodiment of the present specification, as shown in fig. 2, first, a COPT floating authorization server 20 is set, and a COPT dynamic link library 21 and a COPT Python api22 (a Python interface of a COPT) are obtained, the COPT dynamic link library 21 and the COPT Python api22 are installed in a Python virtual environment 23, then the Python virtual environment 23 is compressed, a ZIP-format compressed file 24 is obtained, and then the compressed file 24 is uploaded to an HDFS25 (distributed file system); the HDFS25 employs a Spark framework, and when running, the pre-distribution mechanism of the Spark framework automatically distributes the Python virtual environment 23, so that the Python virtual environment 23 runs in each Spark node 26, and each Spark node 26 can communicate with the Python virtual environment running in the COPT floating authorization server 20 through the Python virtual environment 23 running on its own, so as to queue for authorization, and after each Spark node 26 obtains the COPT authorization, each Spark node 26 can use the COPT for computation.
In the embodiment of the specification, the solver does not support the cluster mode operation, and the solver can be applied to the cluster mode by applying the floating authorization of the solver, so that the solver is applied to a large-scale data solving scene. The technical scheme adopted by the invention is as follows: and installing a Python interface of the solver into a Python virtual environment, and copying the dynamic link library file required by the COPT operation into a dynamic link library folder lib of the Python virtual environment.
Thus, when the Spark program runs, yann will distribute the python environment and the floating authorization configuration file from HDFS (distributed file system) to the master and all worker nodes in advance, replace the python interpreters of all nodes with the previously packaged python environment in the parameter, and since the python virtual environment installs the python interface of COPT during packaging and adds the dynamic link library of the COPT to the dynamic link library of the python virtual environment, all nodes obtaining the python environment package can also find the python interface of the COPT and the dynamic link library of the COPT bottom layer. When the worker node needs to use the copt, the worker node can normally operate only by requesting to obtain the authorization through the started copt floating authorization server. And Spark cluster in the production environment, probably has thousands of nodes, if every node all goes to install the COPT, that can produce huge fortune dimension cost, simultaneously because the authorization of COPT needs the charge, also can produce very big economic cost for all node installation COPT, and this application need not to install the COPT on every node, only need dispose on a server and purchase the authorization of floating and can let the node of operation on the whole cluster all can use the COPT, thereby can effectively reduce cost.
Based on the technical scheme, the virtual environment is created and activated; installing an interface of the solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment; after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file; the compressed file and the configuration file of the floating authorization are arranged in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system, in this way, the interface and the dynamic link library of the solver are arranged in the virtual environment, the compressed file and the configuration file of the virtual environment are arranged in the distributed file system, and the path of the configuration file and the path of the virtual environment are sent to each node, so that each node can access the virtual environment, and therefore each node can access the virtual environment in the authorization server to obtain the authorization, and in this way, each node in the distributed file system can effectively finish obtaining the authorization of the solver by accessing the virtual environment without installing the solver on each node and operating and maintaining each solver, only the operation and maintenance of the authorization server are needed, and the nodes needing the operation and maintenance are effectively reduced, so that the operation and maintenance efficiency can be effectively improved, and the operation and maintenance pressure is reduced.
To the above embodiment, a floating authorization method of a solver is provided, and in an embodiment of the present application, a floating authorization apparatus of a solver is also provided correspondingly, please refer to fig. 3, where the apparatus includes:
an activation unit 301 for creating and activating a virtual environment;
an installation unit 302, configured to install an interface of the solver into the virtual environment, and copy a dynamic link library file of the solver into the virtual environment, where an authorization server has authorization permissions of the solver and the solver installed therein;
a compressing unit 303, configured to compress a file in the virtual environment after copying the dynamic link library file to the virtual environment, so as to obtain a compressed file;
a setting unit 304, configured to set the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and a path of the virtual environment to each node in the distributed file system.
In an optional embodiment, the activating unit 301 is configured to create and activate a python virtual environment in the authorization server, where the authorization server is a linux server, and the floating authorization file of the solver is installed in a directory where an executable file of the authorization server is located.
In an optional implementation manner, the installation unit 302 is configured to decompress the installation package of the solver, obtain a python interface of the solver from the decompressed solver file, and install the python interface into the virtual environment.
In an optional implementation manner, the installing unit 302 is configured to obtain the dynamic link library from the decompressed solver file, and copy the dynamic link library into a dynamic library file in the virtual environment.
In an alternative embodiment, the apparatus further comprises:
and the configuration file acquisition unit is used for acquiring the configuration file of the floating authorization before writing the compressed file and the configuration file of the floating authorization into a distributed file system, wherein the configuration file comprises the IP address of the authorization server and the external open interface of the authorization server.
In an alternative embodiment, the setting unit 304 is configured to place the compressed file into the distributed file system and write the configuration file into the distributed file system.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 4 is a block diagram illustrating an electronic device 800 for a floating authorization method for a solver, according to an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/presentation (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides a presentation interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to present and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for presenting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a floating authorization method of a solver, the method comprising:
creating and activating a virtual environment;
installing an interface of the solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment, wherein the authorization server is provided with authorization permissions of the solver and the solver;
after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file;
setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is only limited by the appended claims
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A floating authorization method for a solver, the method comprising:
creating and activating a virtual environment;
installing an interface of a solver into the virtual environment, and copying a dynamic link library file of the solver into the virtual environment, wherein an authorization server is provided with authorization permissions of the solver and the solver;
after the dynamic link library file is copied to the virtual environment, compressing the file in which the virtual environment is located to obtain a compressed file;
setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
2. The method of claim 1, wherein said creating and activating a virtual environment comprises:
and creating and activating a python virtual environment in the authorization server, wherein the authorization server is a linux server, and the floating authorization file of the solver is installed in a directory where an executable file of the authorization server is located.
3. The method of claim 2, wherein said installing the interface of the solver into the virtual environment comprises:
and decompressing the installation package of the solver, acquiring the python interface of the solver from the decompressed solver file, and installing the python interface into the virtual environment.
4. The method of claim 3, wherein said copying the dynamically linked library file of the solver into the virtual environment comprises:
and acquiring the dynamic link library from the decompressed solver file, and copying the dynamic link library to a dynamic library file in the virtual environment.
5. The method of claim 1, wherein prior to writing the compressed file and the configuration file of the floating authority to the distributed file system, the method further comprises:
and acquiring the configuration file of the floating authorization, wherein the configuration file comprises the IP address of the authorization server and the external open interface of the authorization server.
6. The method of claim 5, wherein the disposing the compressed file and the configuration file of the floating authorization in a distributed file system comprises:
placing the compressed file into the distributed file system, and writing the configuration file into the distributed file system.
7. A floating authorization apparatus for a solver, the apparatus comprising:
an activation unit for creating and activating a virtual environment;
the installation unit is used for installing an interface of a solver into the virtual environment and copying a dynamic link library file of the solver into the virtual environment, wherein an authorization server is provided with authorization permissions of the solver and the solver;
the compression unit is used for compressing the file of the virtual environment after copying the dynamic link library file to the virtual environment to obtain a compressed file;
and the setting unit is used for setting the compressed file and the configuration file of the floating authorization in a distributed file system, so that the distributed file system sends the configuration file and the path of the virtual environment to each node in the distributed file system.
8. The apparatus of claim 7, wherein the activation unit is configured to create and activate a python virtual environment in the authorization server, wherein the authorization server is a linux server, and the floating authorization file of the solver is installed under a directory where an executable file of the authorization server is located.
9. An electronic device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors to execute operating instructions included in the one or more programs for performing the corresponding method according to any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps corresponding to the method according to any one of claims 1 to 6.
CN202110714611.2A 2021-06-25 2021-06-25 Floating authorization method and device of solver and electronic equipment Active CN113392393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110714611.2A CN113392393B (en) 2021-06-25 2021-06-25 Floating authorization method and device of solver and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110714611.2A CN113392393B (en) 2021-06-25 2021-06-25 Floating authorization method and device of solver and electronic equipment

Publications (2)

Publication Number Publication Date
CN113392393A CN113392393A (en) 2021-09-14
CN113392393B true CN113392393B (en) 2022-04-15

Family

ID=77624021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110714611.2A Active CN113392393B (en) 2021-06-25 2021-06-25 Floating authorization method and device of solver and electronic equipment

Country Status (1)

Country Link
CN (1) CN113392393B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645020A (en) * 2008-08-04 2010-02-10 优诺威讯国际有限公司 Virtual operating system creation method
CN104462984A (en) * 2014-11-27 2015-03-25 北京航空航天大学 Application permission divulgence detection method and system based on reverse symbolic execution
CN110162927A (en) * 2019-06-06 2019-08-23 国耀量子雷达科技有限公司 Takeoff and landing method for early warning based on flight simulation platform and anemometry laser radar
CN111367511A (en) * 2020-03-02 2020-07-03 北京中科宇航技术有限公司 Simulation model interface adaptation development system and working method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844460B (en) * 2016-12-21 2020-06-16 浪潮集团有限公司 Method for realizing virtual file system by using Docker container
US11200356B2 (en) * 2019-04-09 2021-12-14 Nvidia Corporation Using a computer to model the reactions of objects to simulated physical interactions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645020A (en) * 2008-08-04 2010-02-10 优诺威讯国际有限公司 Virtual operating system creation method
CN104462984A (en) * 2014-11-27 2015-03-25 北京航空航天大学 Application permission divulgence detection method and system based on reverse symbolic execution
CN110162927A (en) * 2019-06-06 2019-08-23 国耀量子雷达科技有限公司 Takeoff and landing method for early warning based on flight simulation platform and anemometry laser radar
CN111367511A (en) * 2020-03-02 2020-07-03 北京中科宇航技术有限公司 Simulation model interface adaptation development system and working method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SAT based BDD solver for quantified Boolean formulas;G. Audemard 等;《16th IEEE International Conference on Tools with Artificial Intelligence》;20050110;第82-89页 *
汽车驾驶模拟器车辆动力学求解器的设计;郭学立;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20090815;第C035-88页 *

Also Published As

Publication number Publication date
CN113392393A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US10521214B2 (en) Methods and systems for upgrade and synchronization of securely installed applications on a computing device
CN110096302B (en) Software data storage and upgrading method, device, equipment and storage medium
KR20140105318A (en) device and server for applying security policy and method for controlling thereof
CN107169320A (en) Method of calibration and device
CN114721676B (en) Software installation method and device, electronic equipment and readable storage medium
CN105100074A (en) Data operation processing method, device and terminal equipment
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN105808305A (en) Static resource loading method and device
CN110995842A (en) Method, device and equipment for downloading service data and storage medium
CN117193944A (en) Application running environment generation method and device, server and storage device
CN113392393B (en) Floating authorization method and device of solver and electronic equipment
CN107733674B (en) Component upgrading method and terminal
CN110209401B (en) Application program loading method and device
CN111443903A (en) Software development file acquisition method and device, electronic equipment and storage medium
CN107220082B (en) Application program installation method, device and equipment
CN112860625B (en) Data acquisition method, data storage method, device, equipment and storage medium
CN110362330B (en) Application program updating method, device, terminal and storage medium
CN107463414B (en) Application installation method and device
CN111737680B (en) Application program authorization method and device and computer equipment
CN110995767B (en) Request processing method and device
CN114020504B (en) Data processing method and device, electronic equipment and storage medium
CN117240868A (en) Code processing method, apparatus, storage medium, and program product
CN114090132A (en) Application program starting method, application program starting device and equipment
CN117424805A (en) Internet of things equipment networking method and device, electronic equipment and storage medium
CN117033478A (en) Access request processing method, device, server and storage medium

Legal Events

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