CN117632222A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN117632222A
CN117632222A CN202210963860.XA CN202210963860A CN117632222A CN 117632222 A CN117632222 A CN 117632222A CN 202210963860 A CN202210963860 A CN 202210963860A CN 117632222 A CN117632222 A CN 117632222A
Authority
CN
China
Prior art keywords
software
code
processed
dependent
information
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.)
Pending
Application number
CN202210963860.XA
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210963860.XA priority Critical patent/CN117632222A/en
Publication of CN117632222A publication Critical patent/CN117632222A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

A data processing method and device relate to the field of computers. The method comprises the following steps: identifying an interface function in the software code to be processed, wherein the interface function is used for realizing data interaction processing between the software code to be processed and other software codes or an operating system of a computing device where a processor is located; determining a dependent software set according to the identified interface function, wherein the dependent software set comprises at least one software code with a dependency relationship with the software code to be processed, and the dependency relationship comprises at least one of compiling dependency and running dependency; and performing data processing based on the determined dependent software set.

Description

Data processing method and device
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and apparatus for data processing.
Background
In software development, the dependent software is additional code that is intended to be invoked when the software is designed, and this code may be referred to as a package, or library, or module, etc. Call dependent software can avoid repetitive tasks such as designing, testing, debugging and maintaining specific code units.
Typically, software provides an interface function that implements a function that other software invokes, and may append the function of the invoked interface function. When a developer designs the software to be processed, an interface function provided by the dependent software is embedded into a software code, and when the code of the interface function is called in the process of operating the software to be processed, the dependent software providing the interface function is operated, so that the software to be processed has the function provided by the dependent software. In order to ensure the call of the dependent software of the software to be processed when the software to be processed runs, the dependent software needs to be compiled and installed in advance. Currently, a description file (such as spec file) in a software code is adopted to indicate the dependency relationship, and the description file is written manually, so that a plurality of inconveniences are brought to software development work. Therefore, how to automatically acquire the dependency relationship of the software is a problem to be solved.
Disclosure of Invention
The application provides a data processing method and device, which are used for automatically acquiring the dependency relationship of software and improving the convenience of software development.
In order to achieve the above purpose, the embodiment of the application adopts the following technical scheme:
in a first aspect, a method of data processing is provided, the method being executable by a processor. The method specifically comprises the following steps: identifying an interface function in the software code to be processed, wherein the interface function is used for realizing data interaction processing between the software code to be processed and other software codes or an operating system of a computing device where a processor is located; determining a dependent software set according to the identified interface function, wherein the dependent software set comprises at least one software code with a dependency relationship with the software code to be processed, and the dependency relationship comprises at least one of compiling dependency and running dependency; and performing data processing based on the determined dependent software set.
According to the scheme provided by the application, the interface function is automatically identified from the software code to be processed, and because the interface function in the software code to be processed is provided by the dependent software of the software to be processed, the dependent software set can be determined according to the identified interface function, and further data processing can be executed based on the determined dependent software set. The whole process is automatically realized by the processor, and the aim of automatically acquiring the dependency relationship of the software is fulfilled.
In a possible implementation manner, a database is further running in the computing device, and a corresponding relation between the software code and the interface function is recorded in the database, and the determining the dependent software set according to the interface function may be specifically implemented as: and determining the software codes corresponding to the interface functions of the software codes to be processed in the database as the software codes in the dependent software set. Because the interface function in the code of the software to be processed is embodied in the most accurate dependency relationship, the software code (the software code providing the interface function) corresponding to the interface function automatically identified from the code of the software to be processed is the accurate dependent software of the software to be processed, so that the accurate software dependency can be realized.
In a possible implementation, the database may further include information of the software code indicating information used when the software code is called by other software codes. The method provided by the application can further comprise the following steps: adding the determined information of the software codes in the dependent software set of the software codes to be processed to installation dependent information or compiling dependent information in the software codes to be processed, and installing the software codes in the dependent software set in the installation stage of the software codes to be processed based on the installation dependent information; or, based on the compiling dependency information, installing the software code in the set of dependent software at a compiling stage of the software code to be processed. So as to realize the installation of the dependent software or the compiling of the dependent software and ensure the normal operation of the software to be processed.
In another possible implementation, the method provided by the present application may further include: in the scenario where all dependent software is installed in advance, software code that is not dependent by any software code among the software that has been installed for dependency is uninstalled. The software codes which are not depended by any software codes are unloaded, so that the minimization of the system is realized, the consumption of system resources is reduced, the risk of being attacked caused by unnecessary software can be avoided, the security hole of the system is reduced, and the lightweight operating system is realized.
In another possible implementation, the software to be processed may be binary software code, and the identifying an interface function in the software to be processed may be specifically implemented as: the interface function of the binary software code is identified from the reference information of the binary software code. Wherein the reference information may include at least one of a script file, or a library file, or a bin file, or a so file, or a command, or a service. The implementation provides for identifying different code locations or types of the interface functions from the code of the binary software, improving the flexibility of implementation of the scheme.
In another possible implementation, the software to be processed may be a software source code, and the identifying an interface function in the software to be processed may be specifically implemented as: from the reference information of the software source code, an interface function of the software source code is identified. Wherein the reference information includes at least one of makefile, or a dependent static library, or a header file, or a command, or a service. makefile is used to indicate the compiling rules of the software source code. The implementation mode provides the recognition of different code positions or types of the interface function from the software source code, and improves the flexibility of scheme implementation.
In another possible implementation, the interface function may include: at least one of command function code, service function code and data interface function code, the embodiment of the application is not limited to the type of interface and specific expression mode.
In another possible implementation, the method provided by the present application may further include: recording the association relation between the software code to be processed and the dependent software set thereof; when the association relation changes, alarm information is output, and the alarm information is used for indicating that the relation between the software to be processed and the dependent software set changes. And the dependency relationship is identified, the interdependent software is associated, and when the association relationship changes, other software which can be influenced by the change is output in an alarm mode, so that the defect that the change of the interface cannot be perceived by the dependent software can be avoided.
In another possible implementation, the information of the software may include at least one of an identifier and version of the software, an interface provided externally, software content, binary software compiled by the software, a file carried by the binary software compiled by the software, and a data structure. Providing a richer information content of the software to achieve a more accurate software dependency.
In a second aspect, there is provided an apparatus for data processing, which may comprise means for performing the data processing method of the first aspect or any one of the possible implementations of the first aspect.
In a third aspect, a computing device is provided, the computing device comprising at least one processor and memory for storing a set of computer instructions; the method of data processing in the first aspect or any of the possible implementations of the first aspect is performed when the processor executes the set of computer instructions as the processor in the first aspect or the any of the possible implementations of the first aspect.
In a fourth aspect, there is provided a computer-readable storage medium comprising: computer software instructions; the computer software instructions, when executed in a computing device, cause the computing device to perform the operational steps of the method as described in the first aspect or any one of the possible implementations of the first aspect.
In a fifth aspect, there is provided a computer program product for, when run on a computer, causing the computer to perform the operational steps of the method as described in the first aspect or any one of the possible implementations of the first aspect.
The various possible implementations of any of the foregoing aspects may be combined without contradiction between the schemes.
Drawings
FIG. 1 is a schematic architecture diagram of a computing device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for data processing according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a system architecture of a solution provided in an embodiment of the present application;
FIG. 4 is a flowchart illustrating another method for data processing according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
Detailed Description
To facilitate understanding, terms referred to in the embodiments of the present application are explained first.
Software refers to a collection of code written in a computer program language for performing a particular function. The computer program language before compiling is called software source code, and the computer program language after compiling is called binary software.
Interface functions refer to instruction sets provided by software and used for carrying out data interaction processing with other software or an operating system. The interface functions described in the embodiments of the present application may be designed as a service interface function, a command interface function, or a data interface function, or other forms, which are not limited in the embodiments of the present application. When the software dependence is realized, the external interface provided by the dependence software is called in the code of the software, so that the aim of calling the dependence software can be fulfilled.
The information indicating the dependent software needed in the compiling and installing process of the current software is mainly completed by manual operation through a description file, wherein the dependent information comprises: compiling the name and version number information of the software to be relied on, installing the name and version number information of the software to be relied on, providing a plurality of binary packages after compiling, providing a plurality of file information for each software package, and the like. An Operating System (OS) is a collection of software, and generally includes all information of the software, files of each software package, command information, and the like.
For example, the spec file is a description file of software, which is a configuration specification file. The spec file may be used to guide the configuration process of the software, and the spec file may describe: how software is configured, which patches are installed, which files are installed, where they are installed, which system level activities are required by the installation process, etc. After spec writing is completed, a red-cap software package management (RPM) package (rpmbuild) mechanism is created uniformly for specific software to complete source code to binary compiling, and meanwhile, yum is used for installation. yum is an online software installation command that enables an RPM package to be automatically downloaded from a designated server and installed, and dependent software to be automatically downloaded and installed according to the dependency.
The process of software installation and compilation is exemplified as follows:
step 1, the software provides the name of the dependent software in the spec file.
And 2, the software is dependent on the version of the software in the spec file.
And step 3, obtaining a list of compiling dependent software according to the names provided in the spec file.
And step 4, obtaining a list of the installation dependent software according to the names provided in the spec file.
And step 5, obtaining the version of the installation and compiling dependent software according to the version provided in the spec file.
And 6, compiling and installing the dependent software to obtain a list of the binary software.
And 7, obtaining an application program, a library file, a header file and a configuration file list of the binary software.
In the step, the dependency relationship is described in the spec file, the dependency relationship is mainly reflected in the step 3 and the step 4, and when the software version is continuously updated, the scheme has the following problems:
1. the changes of the interface functions provided by the software (such as binary package unpacking mode, software package internal file information and software interface information) or the changes of the types of the interface functions provided by the dependent software (such as call command, call service interface, function interface and variable interface) can cause the changes of the version of the dependent software, but other software does not know the changes, so that the dependency information described in the spec file cannot indicate the latest version.
2. The interfaces of the dependent software called by the software are deleted (such as a call command, a call service interface, a function interface and a variable interface), the software needs to replace the dependent software, but other software does not know the changes, so that the dependent software described in the spec file cannot be normally called.
In order to automatically identify the dependency relationship between the software, the application provides a scheme for acquiring the dependency software, and the interface function is automatically identified from the code of the software to be processed. The whole process is automatically realized by the processor, and the aim of automatically acquiring the dependency relationship of the software is fulfilled.
The embodiments of the present application will be specifically described below with reference to the accompanying drawings.
In one aspect, fig. 1 is a schematic structural diagram of a computing device according to the present embodiment. The computing device may include a general server, an edge server, etc. for implementing computing functions, and the embodiments of the present application are not limited to the product form of the computing device.
As shown in fig. 1, computing device 10 includes a processor 110, a bus 120, a memory 130, a communication interface 140, and a memory unit 150 (also referred to as a main memory unit). Processor 110, memory 130, memory unit 150, and communication interface 140 are coupled via bus 120.
It should be appreciated that in this embodiment, the processor 110 may be a central processing unit (central processing unit, CPU), and the processor 110 may also be other general purpose processors, digital signal processors (digital signal processing, DSP), (application-specific integrated circuit, ASIC), field-programmable gate array (field-programmable gate array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like.
Processor 110 may also be a graphics processor (graphics processing unit, GPU), a neural network processor (neural network processing unit, NPU), a microprocessor, ASIC, or one or more integrated circuits for controlling program execution in the present application.
Communication interface 140 is used to enable communication of computing device 10 with external devices or appliances.
Bus 120 may include a path for transferring information between components such as processor 110, memory unit 150, and storage 130. The bus 120 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. But for clarity of illustration, the various buses are labeled as bus 120 in the figures. Bus 120 may be a peripheral component interconnect express (Peripheral Component Interconnect Express, PCIe) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, a unified bus (Ubus or UB), a computer quick link (compute express link, CXL), a cache coherent interconnect protocol (cache coherent interconnect for accelerators, CCIX), or the like. The bus 120 may be classified into an address bus, a data bus, a control bus, and the like.
As one example, computing device 10 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or computing units for processing data (e.g., computer program instructions).
It should be noted that, in fig. 1, only the computing device 10 includes 1 processor 110 and 1 memory 130 as an example, where the processor 110 and the memory 130 are used to indicate a type of device or device, respectively, and in a specific embodiment, the number of each type of device or device may be determined according to service requirements.
The memory unit 150 may be a volatile memory Chi Huofei pool of volatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
The memory 130 may be a magnetic disk, such as a mechanical hard disk or a solid state disk.
By way of example, the processor 110 may perform the following functions by running or executing software programs and/or modules stored in the memory 130:
identifying an interface function in the software code to be processed, wherein the interface function is used for realizing data interaction processing between the software code to be processed and other software codes or an operating system of a computing device where a processor is located; determining a dependent software set according to the identified interface function, wherein the dependent software set comprises at least one software code with a dependency relationship with the software code to be processed, and the dependency relationship comprises at least one of compiling dependency and running dependency; and performing data processing based on the determined dependent software set.
Specifically, a database may be deployed in the memory unit 150, in which different software codes are configured to provide interface functions externally, and the processor 110 may determine the software codes in the database that provide the identified interface functions as software codes in the dependent software set.
On the other hand, the embodiment of the application provides a data processing method, which is used for acquiring a dependent software set of software to be processed and then running the software to be processed based on the dependent software set to execute data processing. The software to be processed described in the application can be software already running in a computer, such as binary software; alternatively, the software to be processed described in the present application may also be software to be installed in a computer, for example, source code software. Of course, the software to be processed described in the present application may be software of other stages, which is not limited in the embodiments of the present application.
The method for processing data provided in the present application is described in detail below with reference to the accompanying drawings, and fig. 2 is a schematic flow chart of a method for processing data provided in the present application, where the method includes:
s201, the processor 110 identifies interface functions in the software code to be processed.
The interface function is used to implement data interaction processing between the software code to be processed and other software codes or the operating system of the computing device 10 where the processor 110 is located.
The software to be processed is software installed or running on computing device 10.
In a possible implementation manner, in S201, a command character or a key field for indicating an interface function may be screened from a code of the software to be processed, and when the command character or the key field for indicating the interface function is screened, content pointed to by the command character or the key field is the interface function in the software to be processed.
It should be noted that, in different programming languages, command characters indicating the interface function are different, which is not limited in the embodiments of the present application.
For example, S201 may be performed using an identification tool provided by a design language of the software to be processed, so as to identify an external interface for acquiring a call of the software to be processed from a code of the software to be processed.
For example, a nm/ldd tool in the C language may be used to identify interface functions in software code designed in the C language.
In a possible implementation manner, in S201, an interface function for acquiring the software to be processed may be identified from the code context of the software to be processed.
In another possible implementation manner, in S201, the interface function for acquiring the software to be processed may be identified from the reference information of the code of the software to be processed.
The software to be processed is illustratively binary software, and the reference information may include a script file, a library file, a bin file, a so file, a command, or a service.
Illustratively, the software to be processed is software source code, and the reference information may include makefile, or a static library, or a header file.
Of course, in practical application, the content or the form of the reference information may be configured according to the actual requirement, which is not limited in the embodiment of the present application.
Further, the interface function described in the embodiment of the present application may include: command function code, service function code, data interface function code, or other modality, to which embodiments of the present application are not limited.
For example, the interface function of the software code to be processed may be one or more, i.e. one or more interface functions may be identified in S201.
S202, the processor 110 determines a dependent software set according to the identified interface function.
Wherein the determined set of dependent software includes at least one software code having a dependency relationship with the software code to be processed, the dependency relationship may include at least one of a compilation dependency or a run dependency.
Specifically, the computing device 10 also has a database running therein, and the database has a correspondence between software codes and interface functions recorded therein. The interface function may be a command function code, a service function code, a data interface function code, or other forms, which are not limited in the embodiments of the present application.
The interface function corresponding to the software code in the database can be an interface function externally provided by the software code.
By way of example, table 1 illustrates a database. In the database illustrated in table 1, unique software codes are indicated by software names and software versions.
TABLE 1
Software name Software version Interface function
ID1 V1.1 Interface function a
ID1 V1.1 Interface function b
ID2 V2.3 Interface function c
…… …… ……
Specifically, since the interface function corresponding to the software code is recorded in the database, when the interface function of the software to be processed is identified in S201, the database is queried to determine the software code corresponding to the identified interface function, and then the software code corresponding to the interface function identified in S201 in the database is determined as the software code in the above-mentioned dependent software set.
For example, the interface function of the software to be processed identified in S201 may be provided by one or more software, i.e. in the database, the interface function of the software to be processed identified in S201 may correspond to one or more software codes, and thus the above-mentioned set of dependent software includes one or more software codes.
For example, assuming that the interface function of the software to be processed is identified as the interface function a in S201, the database illustrated in table 1 is queried, and it is determined that the interface function a corresponds to the ID1 software version V1.1, the dependent software set of the software to be processed includes the ID1 software version V1.1.
S203, the processor 110 performs data processing based on the dependent software set.
Specifically, in the running stage of the software to be processed, the software codes in the dependent software set are called to execute data processing.
According to the scheme provided by the application, the interface function is automatically identified from the code of the software to be processed, and the interface function in the code is provided by the dependent software of the software to be processed, so that the dependent software set can be determined according to the identified interface function, and further data processing can be executed based on the determined dependent software set. The whole process is automatically realized by the processor, and the aim of automatically acquiring the dependency relationship of the software is fulfilled.
The system architecture of the solution provided in the embodiment of the present application may be as shown in fig. 3. As shown in fig. 3, for the software to be processed (binary software, so software, tar software) or software source code (for example tar. Gz software), the interface function therein is first identified, the database is queried, and the software code corresponding to the identified interface function in the database is determined as the software code in the dependent software set of the software to be processed. For binary software code, the dependent software may be in the form of a so dynamic library or service or command. For software source code, the dependent software may be in the form of a static library or header file. Then, for binary software codes, the dependent software is installed; for software source code, the dependent software is compiled.
It should be noted that, the solution provided in the embodiment of the present application may be executed when compiling or installing a certain software code to be processed, or may also be executed when a certain installed software code is started, or may also be executed periodically, or may also be executed when the operating system consumption is planned to be reduced (for reducing the system weight), so as to automatically identify and determine the dependent software set of the running software code, and implement accurate software dependency.
The solution provided in the present application may be implemented in the form of a script, a command, or a service, and the embodiment of the present application is not specifically limited to a specific presentation form of the solution.
Further, the database may further include information of the software code, where the information of the software code is used to indicate information used when the software code is called by other software. Specifically, the content of the information of the software code may be configured according to actual requirements, so long as the purpose of calling the software code can be achieved, which is not limited in the embodiment of the present application.
By way of example, the information of the software code may include an identification and version of the software. The identification of the software code may be the name of the software code. For example, the information of the software code is illustrated in table 1 as the name and version of the software.
In a possible implementation manner, the information of the software code may further include at least one of an interface provided externally, software content, binary software compiled by the software, a file carried by the binary software compiled by the software, and a data structure.
In the application scenario that the dependency relationship is embodied through the dependency information, the information of the software code in the dependency software set determined in S202 may also be added to the software code to be processed as the dependency information of the software to be processed, so as to implement the call of the software to be processed to the dependency software. Accordingly, as shown in fig. 4, the solution provided in the embodiment of the present application may further include S204.
S204, the processor 110 adds the information of the software codes in the dependent software set to the installation dependent information or compiling dependent information of the software codes to be processed.
In particular, information that depends on the software code in the software collection may be obtained in a database.
For example, if the software to be processed is a binary software code, in S204, information of the software code in the set of dependent software may be added to the installation dependent information of the software to be processed.
Wherein the installation dependency information is part of the binary software code, the installation dependency information being configured in a description file of the binary software code. The installation dependency information is used for indicating the software to be relied on in the installation stage of the binary software code, and before the binary software code is installed, the installation of the software to be processed can be ensured only if the dependent software indicated by the installation dependency information is installed.
In a possible implementation manner, the software code to be processed is a binary software code, the binary software code is installed for the first time, the installation dependency information in the binary software code is null, and in S204, the information of the software code in the dependency software set determined in S202 is used as the installation dependency information, and the location of the installation dependency information in the binary software code is filled.
In a possible implementation manner, the software code to be processed is a binary software code, the binary software code is not installed for the first time, for example, the installation of the new version of the binary software code can be performed for an upgrade version stage of the software to be processed, the installation dependency information in the binary software code is not null, the content of the installation dependency information is the information of the previous dependency software set, and the original content of the installation dependency information in the binary software code in S204 is replaced by the information of the software code in the dependency software set determined in S202.
For example, if the software to be processed is a software source code, in S204, information of the software code in the dependency software set may be added to the compiled dependency information of the software to be processed. The compilation dependency information is used to indicate the dependency software that needs to be invoked at the compilation stage of the software to be processed.
The compiling dependency information is a part of a software source code, is used for indicating software to be relied on in a compiling stage, and before the software to be processed is compiled, the dependent software indicated by the compiling dependency information is installed, so that accurate compiling of the software to be processed can be ensured.
In a possible implementation manner, the software code to be processed is a software source code, the software source code is compiled for the first time, the compiling dependency information in the software source code is null, and in S204, the information of the software code in the dependent software set determined in S202 is used as the compiling dependency information, and the compiling dependency information in the software source code is filled.
In a possible implementation manner, the software code to be processed is a software source code, the software source code is not compiled for the first time, for example, the software source code of a new version can be compiled for an upgrade version stage of the software to be processed, compiling dependency information in the software source code is not null, the content of the compiling dependency information is information of a previous dependency software set, and the original content of the compiling dependency information in the software source code in S204 is replaced by the information of the software code in the dependency software set determined in S202.
It should be understood that, the addition of the information of the software code in the dependent software set to the installation dependent information or the compiling dependent information of the software to be processed may be the filling of the information of the software code in the dependent software set to the installation dependent information or the compiling dependent information of the corresponding field in the dependent information.
S205, the processor 110 installs the software codes in the dependent software set in the installation stage of the software codes to be processed based on the installation dependent information; or, based on the compiling dependency information, installing the software code in the set of dependent software at a compiling stage of the software code to be processed.
In the application scenario of implementing software dependency by installing all software, the installed software codes outside the dependent software set determined in S202 may be also uninstalled, so as to reduce the overhead of system resources, and achieve the purpose of defining a lightweight operating system by software. Accordingly, as shown in fig. 4, the method provided in the embodiment of the present application may further include S206.
S206, the processor 110 uninstalls the software code which is not depended by any software in the installed software code for dependences.
The foregoing embodiment describes a process of automatically identifying a dependency relationship of a software code, and based on this, the embodiment of the present application further provides a process of changing and managing the dependency relationship, as shown in fig. 4, and the method provided in the embodiment of the present application may further include S207 and S208.
S207, the processor 110 records the association relation between the software codes to be processed and the dependent software set.
Specifically, after determining the dependent software set of the software to be processed in S202, executing S207, the software installed in the computing device may be associated with the dependent software set thereof, so as to embody the dependent association of each software code installed in the computing device. When a certain software changes (such as interface changes and deletion), it can be determined according to the association relation that the change can cause the software associated with the change to possibly need to be changed.
S208, when the association relation changes, outputting alarm information.
The change of the association relationship may mean that the association relationship cannot embody the latest dependency relationship. For example, changes in the version or interface of the software code in the dependent software set, or changes in the software that the software to be processed needs to depend on, may cause changes in the association relationship.
The alarm information is used for indicating that the relation between the software to be processed and the dependent software set is changed.
In one possible implementation, the alert information is used to visually learn by a developer modifying the software code which software is affected by the current modification.
For example, the alert information may include a manifest of software associated with the software of the interface change.
Illustratively, according to the alarm information, a developer modifying the software code can cancel the modification according to the actual requirement, or complete the modification, and perform corresponding processing on the associated software code so as to ensure the accurate dependence of the software.
The following describes in detail, by way of specific examples, the schemes provided in the embodiments of the present application.
Assuming that the user operates the computing device, the software 1 is installed, and when the software 1 initiates the installation, the processing procedure includes:
s1, a processor of the computing device identifies an interface function a and an interface function c from software source code of software 1.
S2, the processor of the computing device queries the database shown in the table 1, and determines software codes ID 1V 1.1 and ID2V2.3 corresponding to the interface function a and the interface function c in the database as a dependent software set of the software 1.
S3, the processor of the computing device adds the information of the software codes ID 1V 1.1 and ID2V2.3 to the compiling dependent information of the software source code of the software 1.
S4, the processor of the computing device installs ID 1V 1.1 and ID2V2.3 according to the compiling dependency information.
S5, compiling the software source code of the software 1 by a processor of the computing device, and calling the installed functions of the ID 1V 1.1 and ID2V2.3 in the compiling process to obtain the binary software code of the software 1.
S6, the processor of the computing device runs binary software codes of the software 1.
It will be appreciated that in order to implement the functionality of the above embodiments, the processor of the computing device includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application scenario and design constraints imposed on the solution.
The method of data processing provided according to the present embodiment is described in detail above with reference to fig. 2 to 4, and the apparatus of data processing provided according to the present embodiment will be described below with reference to fig. 5.
Fig. 5 is a schematic structural diagram of a possible data processing apparatus according to this embodiment. These data processing means may be used to implement the functions of the processor in the above-described method embodiments, and thus may also implement the advantages provided by the above-described method embodiments. In this embodiment, the data processing device may be a module (e.g., a chip) applied to a server.
As shown in fig. 5, the data processing apparatus 50 includes an identification module 501, a determination module 502, and a processing module 503. The data processing device 50 is used to implement the functions of the processor 110 in the method embodiments shown in fig. 2 and 4 described above.
The identifying module 501 is configured to identify an interface function in the software code to be processed. For example, the identification module 501 is configured to perform the process of S201 in fig. 2 or fig. 4.
A determining module 502, configured to determine a dependent software set according to the identified interface function, where the dependent software set includes at least one software code that has a dependency relationship with the software code to be processed, and the dependency relationship includes at least one of a compilation dependency or an operation dependency. For example, the determining module 502 is configured to perform the process of S202 in fig. 2 or fig. 4.
A processing module 503 for performing data processing based on the set of dependent software. For example, the processing module 503 is configured to perform the process of S203 in fig. 2 or fig. 4.
It should be noted that the apparatus 50 for data processing according to the embodiment of the present application may be implemented as the processor 110 in each of the method steps in fig. 2 or fig. 4. It should be appreciated that the data processing apparatus 50 of the embodiments of the present application may be implemented by an ASIC, or a PLD, which may be a complex program logic device (complex programmable logical device, CPLD), FPGA, general array logic (generic array logic, GAL) or any combination thereof. When the method of data processing shown in fig. 2 or fig. 5 is implemented by software, each module thereof may be a software module, and the data processing apparatus 50 and each module thereof may be a software module.
The apparatus 50 for data processing according to the embodiments of the present application may correspond to performing the methods described in the embodiments of the present application, and the above and other operations and/or functions of each unit in the apparatus 50 for data processing are respectively for implementing the corresponding flow of each method in fig. 2 or fig. 4, which are not described herein for brevity.
As another form of the present embodiment, there is provided a computer-readable storage medium having stored thereon instructions that, when executed, perform the method of data processing in the method embodiment described above.
As another form of the present embodiment, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of data processing in the method embodiments described above.
The embodiment of the application further provides a chip system, which comprises a processor and is used for realizing the technical method of the embodiment of the invention. In one possible design, the system on a chip also includes memory to hold the program instructions and/or data necessary for embodiments of the present invention. In one possible design, the system-on-chip further includes a memory for the processor to invoke application code stored in the memory. The chip system may be formed by one or more chips, or may include chips and other discrete devices, which are not specifically limited in this embodiment.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded or executed on a computer, produces, in whole or in part, a flow or function according to embodiments of the present invention. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more sets of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk (solid state diskrive, SSD).
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of data processing, the method performed by a processor, comprising:
identifying interface functions in the software codes to be processed, wherein the interface functions are used for realizing data interaction processing between the software codes to be processed and other software codes or an operating system of a computing device where the processor is located;
determining a dependent software set according to the interface function, wherein the dependent software set comprises at least one software code with a dependency relationship with the software code to be processed, and the dependency relationship comprises at least one of compiling dependency and running dependency;
and performing data processing based on the dependent software set.
2. The method of claim 1, wherein a database is further run in the computing device, the database having a correspondence between software code and interface functions recorded therein, the determining a set of dependent software according to the interface functions comprising:
and determining the software codes corresponding to the interface functions of the software codes to be processed in the database as the software codes in the dependent software set.
3. A method according to claim 1 or 2, wherein a database is also run in the computing device, the database comprising information of the software code indicating information used when the software code is called by other software; the method further comprises the steps of:
adding the information of the software codes in the dependent software set to the installation dependent information or compiling dependent information in the software codes to be processed;
installing the software codes in the dependent software set in the installation stage of the software codes to be processed based on the installation dependent information; or based on the compiling dependency information, installing the software codes in the dependent software set at the compiling stage of the software codes to be processed.
4. A method according to any one of claims 1-3, characterized in that the software code to be processed is a binary software code; the identifying the interface function in the software code to be processed comprises:
identifying an interface function in the binary software from the reference information of the binary software code; wherein the reference information includes at least one of a script file, a library file, a bin file, a so file, a command, or a service.
5. A method according to any one of claims 1-3, wherein the software code to be processed is software source code; the identifying the interface function in the software code to be processed comprises:
identifying an interface function in the software source code from the reference information of the software source code; wherein the reference information comprises at least one of compiling rules of the software source code, or a static library or a header file.
6. The method of any of claims 1-5, wherein the interface function comprises:
command function code, service function code, or data interface function code.
7. The method according to any one of claims 1-6, further comprising:
recording the association relation between the software codes to be processed and the dependent software set;
when the association relation changes, outputting alarm information, wherein the alarm information is used for indicating the relation between the software codes to be processed and the dependent software set to change.
8. The method of claim 2, wherein the information of the software code includes at least one of an identification of the software, a version of the software, an externally provided interface, a content of the software, a binary software compiled by the software, a file carried by the binary software compiled by the software, and a data structure.
9. A data processing apparatus, the apparatus comprising:
the identification module is used for identifying interface functions in the software codes to be processed, and the interface functions are used for realizing data interaction processing between the software codes to be processed and other software codes or an operating system of a computing device where the device is located;
the determining module is used for determining a dependent software set according to the interface function, wherein the dependent software set comprises at least one software code with a dependency relationship with the software code to be processed, and the dependency relationship comprises at least one of compiling dependency and running dependency;
and the processing module is used for executing data processing based on the dependent software set.
10. A computing device comprising a memory and at least one processor, the memory for storing a set of computer instructions; the method of data processing of any of the preceding claims 1-8 when said processor executes said set of computer instructions.
CN202210963860.XA 2022-08-11 2022-08-11 Data processing method and device Pending CN117632222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210963860.XA CN117632222A (en) 2022-08-11 2022-08-11 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210963860.XA CN117632222A (en) 2022-08-11 2022-08-11 Data processing method and device

Publications (1)

Publication Number Publication Date
CN117632222A true CN117632222A (en) 2024-03-01

Family

ID=90034325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210963860.XA Pending CN117632222A (en) 2022-08-11 2022-08-11 Data processing method and device

Country Status (1)

Country Link
CN (1) CN117632222A (en)

Similar Documents

Publication Publication Date Title
US11853774B2 (en) Dynamically loaded plugin architecture
JP4878715B2 (en) Method, computer system and computer readable recording medium for patching applications that do not conform to operating system
US8954939B2 (en) Extending a development environment
US9891939B2 (en) Application compatibility with library operating systems
US8997089B2 (en) Computer system and a method of deploying an application in a computer system
US8984502B2 (en) Systems and methods for composing or decomposing a composite image for firmware update images
US10684846B2 (en) Using semantic annotations to control compatibility behaviors
US7032213B1 (en) Fixing incompatible applications using a light debugger
US20090235284A1 (en) Cross-platform compatibility framework for computer applications
US20040210883A1 (en) Method and apparatus for building executable computer programs using compiled program libraries
CN111176722B (en) Method, device and storage medium for detecting file version of third party library
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
US9495146B2 (en) Host and method of upgrading connection manager of dongles
US7818756B2 (en) SKU determination mechanism and API
WO2022194173A1 (en) Patching method and relevant device
CN117632222A (en) Data processing method and device
US20100229167A1 (en) Testing operating system isolation using error injection
WO2011157105A2 (en) Method and device for component expansion
CN113641389B (en) Software upgrading method, device and equipment based on OpenCPU
CN114253615B (en) Method and device for setting bootstrap program, electronic equipment and storage medium
US11249733B2 (en) Electronic apparatus and control method thereof
CN115016850B (en) UEFI firmware starting mode switching method based on domestic processor platform
CN115878197A (en) Starting optimization method, system, chip, device and medium based on device tree
CN112667413A (en) Access control method and system of business rule engine and readable storage medium
CN115390916A (en) Software program processing method and device and electronic equipment

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