Methods, apparatus, electronic devices and media for determining component versions

CN115827041BActive Publication Date: 2026-09-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111089280.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-16
Publication Date
2026-09-01
Estimated Expiration
2041-09-16

AI Technical Summary

Technical Problem

由于业务的复杂,iOS项目依赖的组件越来越多,直接使用目标项目开发效率变得低下,许多功能需要编写自己的用户样例(Demo),用来调试自己的代码

Benefits of technology

[0044]The beneficial effects of this disclosure are as follows: By sharing the component dependency result files of the target project to the server, this disclosure achieves component dependency information sharing, which other projects can download and use independently, laying the groundwork for component version matching between projects. For the user sample, by using the component dependency information from the target project, the user sample's own dependencies are installed. Throughout the process, only the component version needs to be replaced with the version number used in the target project. The operation is simple, easy to execute, and less prone to errors. Moreover, this operation can significantly reduce the time consumed by the dependency arbitration algorithm during the dependency arbitration process, improving the efficiency of determining component versions and reducing operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827041B_ABST
    Figure CN115827041B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and medium for determining component versions, belonging to the field of computer technology. The method includes: obtaining dependency information of a target project based on user input, wherein the target project is a synchronized project corresponding to a user sample; parsing the dependency information to obtain a dependency information parsing result; iteratively obtaining a list of component versions corresponding to the user sample, and searching for the component version number corresponding to each component in the component version list that is identical to each component in the dependency information parsing result; setting the component version number as a priority in the component version list to obtain an updated component version list; and determining the version corresponding to each component of the user sample based on the updated component version list. This achieves the effect of assisting in quickly determining component versions and improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of computer technology, and in particular relates to a method, apparatus, electronic device and medium for determining component versions. Background Technology

[0002] Currently, iOS development often requires the use of third-party libraries such as ASIHttpRequest, AFNetworking, and JSONKit. While these libraries greatly simplify project development, integrating them requires manual configuration. For example, integrating ASIHttpRequest necessitates manually adding system frameworks like CFNetwork and MobileCoreServices in addition to the source code. Furthermore, updates to these libraries require manual project updates, making the process cumbersome. Currently, CocoaPods is widely used for component management in iOS development. CocoaPods downloads necessary components to the local machine based on the analyzed component list, making them available for the target project. However, due to increasing business complexity and the growing number of dependent components in iOS projects, directly using the target project becomes inefficient. Many features require custom user demos for debugging. In existing technologies, the version numbers of components depended on by user demos differ from those depended on by the target project, leading to compatibility issues between the user demos and the target project. Summary of the Invention

[0003] To at least address the aforementioned technical problems, this disclosure provides a method, apparatus, electronic device, and readable storage medium for determining component versions.

[0004] According to a first aspect of this disclosure, a method for determining a component version is provided, comprising:

[0005] Obtain the dependency information of the target project based on user input, wherein the target project is the synchronized project corresponding to the user sample;

[0006] The dependency information is parsed to obtain the dependency information parsing result;

[0007] Loop through the list of component versions corresponding to the user sample, and find the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result;

[0008] Set the component version number as the priority in the component version list, and obtain the updated component version list;

[0009] The version corresponding to each component of the user sample is determined based on the updated component version list.

[0010] Furthermore, the step of cyclically obtaining the list of component versions corresponding to the user sample includes:

[0011] For each component corresponding to the user sample, a version sequence of available historical version numbers for each component is obtained cyclically, wherein the priority of the historical version number in the version sequence is related to the version release time.

[0012] Furthermore, the step of searching for the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result includes:

[0013] Obtain the component version number of the component used by the target project from the dependency information parsing results.

[0014] Furthermore, setting the component version number as a priority digit in the component version list includes:

[0015] The component version number that is the same as the one used in the target project in the component version list is taken as the priority version number and set to the first priority position of the corresponding component's version sequence to obtain the updated component version list.

[0016] Furthermore, determining the version corresponding to each component of the user sample based on the updated component version list includes:

[0017] If no changes to the dependencies of a component in a user sample are detected, the version of the component is determined based on the component version number with the highest priority in the current version sequence. Otherwise, the version number is obtained from the component version list in order of priority to determine the version.

[0018] Furthermore, obtaining the dependency information of the target project based on user input includes:

[0019] Generate a component dependency result file based on the version information of the target project, and save the component dependency result file to the server;

[0020] Obtain user sample configuration information and save the user sample configuration information;

[0021] Based on the user sample configuration information, download the dependency information of the target project corresponding to the user sample from the component dependency result file.

[0022] Furthermore, the step of generating a component dependency result file based on the version information of the target project and saving the component dependency result file to the server includes,

[0023] The component version address and component version number of each component are obtained from the version information of the target project. The obtained component version address and component version number of each component are mapped to generate a release component dependency list. The release component dependency list is then saved as a component dependency result file to the server.

[0024] Furthermore, the step of obtaining and saving the user sample configuration information includes:

[0025] The user sample configuration information is obtained and saved using a separate command.

[0026] According to a second aspect of this disclosure, an iOS component version-assisted arbitration device is provided, comprising:

[0027] The download module is used to obtain the dependency information of the target project based on user input, wherein the target project is the synchronized project corresponding to the user sample;

[0028] The parsing module is used to parse the dependency information and obtain the dependency information parsing result;

[0029] The lookup module is used to cyclically obtain the component version list corresponding to the user sample, and search for the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result;

[0030] The setting module is used to set the component version number as the priority position in the component version list and obtain the updated component version list.

[0031] The determination module is used to determine the version corresponding to each component of the user sample based on the updated component version list.

[0032] Furthermore, the search module includes a loop search submodule, which is used to cyclically obtain the version sequence of available historical version numbers for each component corresponding to the user sample, wherein the priority of the historical version number in the version sequence is related to the version release time.

[0033] Furthermore, the search module includes a version number search submodule, used to obtain the component version number of the component used by the target project from the dependency information parsing result.

[0034] Furthermore, the setting module is used to set the component version number that is the same as that used in the target project in the component version list as the priority version number and set it to the first priority position in the version sequence of the corresponding component, so as to obtain the updated component version list.

[0035] Furthermore, the determining module is specifically used to determine the version of a component if, for a component in a user sample, no changes to the component's dependencies are detected by the user; otherwise, the version number is obtained from the component version list in order of priority for version determination.

[0036] Furthermore, the download module includes:

[0037] The dependency result submodule is used to generate component dependency result files based on the version information of the target project and save the component dependency result files to the server.

[0038] The acquisition module is used to acquire user sample configuration information and save the user sample configuration information;

[0039] The dependency information submodule is used to download the dependency information of the target project corresponding to the user sample from the component dependency result file based on the user sample configuration information.

[0040] Furthermore, the dependency result submodule is specifically used to obtain the component version address and component version number of each component from the version information of the target project, establish mapping between the obtained component version address and component version number of each component, generate a release component dependency list, and then save the release component dependency list as a component dependency result file to the server.

[0041] Furthermore, the acquisition module is specifically used to acquire and save the user sample configuration information in the form of an independent command.

[0042] According to a third aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any of the first aspects of this disclosure.

[0043] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing a program that, when executed, can implement the method as described in any one of the first aspects of this disclosure.

[0044] The beneficial effects of this disclosure are as follows: By sharing the component dependency result files of the target project to the server, this disclosure achieves component dependency information sharing, which other projects can download and use independently, laying the groundwork for component version matching between projects. For the user sample, by using the component dependency information from the target project, the user sample's own dependencies are installed. Throughout the process, only the component version needs to be replaced with the version number used in the target project. The operation is simple, easy to execute, and less prone to errors. Moreover, this operation can significantly reduce the time consumed by the dependency arbitration algorithm during the dependency arbitration process, improving the efficiency of determining component versions and reducing operating costs. Attached Figure Description

[0045] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein,

[0046] Figure 1 Here is a flowchart of a method for determining a component version provided in this disclosure;

[0047] Figure 2 This disclosure provides a method for determining a component version. (Thread diagram)

[0048] Figure 3 This is a schematic diagram of the structure of a component version determination device provided in this disclosure;

[0049] Figure 4 This is a schematic diagram of an electronic device structure provided in this disclosure. Detailed Implementation

[0050] The embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this disclosure, and should not be construed as limiting this disclosure.

[0051] To more clearly illustrate this disclosure, the preferred embodiments and accompanying drawings will be used for further description. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of this disclosure.

[0052] In a first aspect of this disclosure, a method for determining a component version is provided, such as Figure 1 As shown, it includes:

[0053] Step 101: Obtain the dependency information of the target project based on the user input, wherein the target project is the synchronized project corresponding to the user sample;

[0054] In this disclosure, firstly, before obtaining user input, the server needs to store shareable dependency information of the target project. Specifically, a component dependency result file is generated based on the version information of the target project, and the component dependency result file is saved to the server;

[0055] In this disclosure, when the target project updates its version, a release component dependency list is generated based on the updated version information. This version information includes at least the component version address and version number of each component. This release component dependency list is used as a component dependency result file, which is saved to the server and shared. Specifically, the component dependency result file can be a Podfile.lock file. The Podfile.lock file will indicate the exact versions of the target project's current dependent libraries, including the version numbers of the components used by the project, the directly used libraries, and other libraries that these libraries depend on.

[0056] Furthermore, the component version address and component version number of each component are obtained from the version information of the target project. The obtained component version address and component version number of each component are mapped to generate a release component dependency list. The release component dependency list is then saved as a component dependency result file to the server.

[0057] Secondly, set the user sample configuration information, and obtain and save the user sample configuration information;

[0058] In this disclosure, the user sample configuration information includes at least: the user sample address and the target project version number. The user sample configuration information can be set using a separate command; specifically, the user sample address and the target project version number are set using a separate command.

[0059] Next, based on the user sample configuration information, download the dependency information of the target project corresponding to the user sample from the component dependency result file;

[0060] In this disclosure, when using CocoaPods to install dependencies, the user sample configuration information set by the user is read, and the component version list is obtained based on the read user sample configuration information.

[0061] Furthermore, in the case of installing dependencies, the user sample address and target project version number are obtained based on the user sample configuration information, and the component version list is obtained based on the user sample address and target project version number.

[0062] In this disclosure, dependency information matching the component version list is downloaded from a component dependency result file stored on the server.

[0063] Furthermore, after obtaining the list of component versions, the matching dependency information is downloaded from the component dependency result file stored on the server based on the list of component versions.

[0064] Step 102: Parse the dependency information to obtain the dependency information parsing results;

[0065] In this disclosure, the dependency information is parsed to obtain at least the component version number and component version address corresponding to each component, which are used as the result of dependency information parsing.

[0066] Step 103: Loop through the list of component versions corresponding to the user sample, and find the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result;

[0067] In this disclosure, the dependency information parsing results and the component version list are searched separately to find the same components, thus preparing for component version alignment.

[0068] For each component corresponding to the user sample, a version sequence of available historical version numbers for each component is obtained iteratively. The priority of the historical version number in the version sequence is related to the version release time. Specifically, the initial priority of the historical version number in the version sequence is positively correlated with the version release time, meaning that newer versions have higher initial priority. A historical version number refers to the version number that is compatible with the version numbers of other components among all versions released and updated for this component.

[0069] Specifically, the version sequence for each component is obtained cyclically. This is because if it is first determined that the first version number aa of component A is available, and then it is determined that the first version bb of component B is available, but aa and bb are incompatible, then it may be necessary to repeat the loop to arbitrate (determine) the version number.

[0070] After identifying the components used in the user sample, the component version number of the component used by the target project is obtained from the dependency information parsing result.

[0071] In this disclosure, after obtaining the same component from the dependency information parsing results and the component version list, the component version number used by the target project is then obtained from the dependency information parsing results. This solution allows the determination of the required component version by obtaining the component version number used by the target project.

[0072] Step 104: Set the component version number as the priority in the component version list and obtain the updated component version list.

[0073] In this disclosure, the component version number that is the same as that used in the target project in the component version list is taken as the priority version number, and the priority version number is set to the first priority position of the corresponding component version to obtain the updated component version list.

[0074] Step 105: Determine the version of each component in the user sample based on the updated component version list;

[0075] In one embodiment of this disclosure, if a component that is the same as the component version number in the dependency information parsing result and the component version number in the component version number list is detected, and the component version number in the component version number list is the priority version number, that is, if the component version number used by the target project has been set to the first priority position in the component version number list, if no user change of related dependencies is detected, the dependency arbitration is determined to be successful; otherwise, a component version number in the first priority position is obtained from the component version number list.

[0076] In other words, if no changes to the dependencies of a component are detected in the user sample, the version of the component is determined according to the component version number with the first priority in the current version sequence; otherwise, the version number is obtained from the component version list in order of priority to determine the version.

[0077] This disclosure achieves component dependency information sharing by sharing the target project's component dependency result file to a server. Other projects can download and use this information, laying the groundwork for component version compatibility between projects. For the user sample, by using the component dependency information from the target project, the user sample's own dependencies are installed. The entire process only requires replacing the component version with the version number used in the target project. The operation is simple, easy to execute, and less prone to errors. Moreover, this operation can greatly reduce the time consumed by the dependency arbitration algorithm during the dependency arbitration process, thus reducing workload.

[0078] In another embodiment of this disclosure, a method for determining a component version is provided, such as... Figure 2 As shown, it includes:

[0079] When the target project updates its version, the generated release component dependency list is saved as a component dependency result file to the server.

[0080] When setting the target project version, the system can specifically request the user to enter the target project address and the target project version, where the target project version is the target project version number. The system saves the user-entered target project address and version. It should be noted that the user-entered target project address and version specifically refer to the user sample address and target project version number. Furthermore, the target project address and version can be set using separate commands.

[0081] When CocoaPods installs dependencies, it reads the target project configuration information, specifically the target project address and version entered by the user. Based on this, it reads the component version list and downloads the target project dependency list from the component dependency result file. This means downloading matching dependency information from the component dependency result file, thus obtaining the target project dependency information. The dependency information is then parsed to obtain the dependency information parsing result. In the user example, when arbitrating dependencies, each time the component version list is retrieved, the same component is found in the dependency information parsing result, the version number used by the target project is obtained, and that version number is moved to the component version list as the first priority version, effectively setting the component version number to the priority position.

[0082] If the user has not changed the relevant dependencies, arbitration should succeed directly when using the first priority version; if the user has changed the relevant dependencies, the next component version number under the first priority will be tried from the version list.

[0083] In summary, this disclosure sets priority for each component in the component version list, minimizes the introduction of dependencies, reduces the computation time of the dependency arbitration algorithm, and saves work costs. In addition, this disclosure directly uses the component dependency versions of the target project, further reducing the time consumption of the arbitration algorithm and improving work efficiency.

[0084] In a second aspect of this disclosure, a device for determining a component version is provided, such as Figure 3 As shown, it includes:

[0085] Download module 301 is used to obtain the dependency information of the target project based on user input. The target project is the project corresponding to the user sample.

[0086] In this disclosure, the download module 301 includes a dependency result submodule, an acquisition module, and a dependency information submodule.

[0087] The dependency result submodule is used to generate a component dependency result file based on the version information of the target project, and save the component dependency result file to the server.

[0088] Furthermore, the dependency result submodule is specifically used to obtain the component version address and component version number of each component from the version information of the target project, establish mappings for the obtained component version address and component version number of each component, generate a release component dependency list, and then save the release component dependency list as a component dependency result file to the server.

[0089] Furthermore, the dependency results submodule is used to generate a release component dependency list based on the updated version information of the target project when the target project is updated. This version information includes at least the component version address and version number of each component. The release component dependency list is then saved as a component dependency result file on the server for sharing. Specifically, the component dependency result file can be a Podfile.lock file. The Podfile.lock file will indicate the exact versions of the target project's current dependent libraries, including the version numbers of the components used by the project, the directly used libraries, and other libraries that these libraries depend on.

[0090] The acquisition module is used to acquire user sample configuration information and save the user sample configuration information;

[0091] In this disclosure, the user sample configuration information includes at least: the user sample address and the target project version number.

[0092] Furthermore, the acquisition module is used to acquire and save the user sample configuration information in a separate command manner.

[0093] The dependency information submodule is used to download the dependency information configuration of the target project corresponding to the user sample from the component dependency result file based on the user sample configuration information.

[0094] In this disclosure, the download module 301, when using CocoaPods to install dependencies, reads the user sample configuration information set by the user and obtains the component version list based on the read user sample configuration information.

[0095] Furthermore, the download module 301 is used to obtain the user sample address and target project version number based on the user sample configuration information, and to obtain a list of component versions based on the user sample address and target project version number.

[0096] In this disclosure, the download module 301 is specifically used to, in the case of installing dependencies, obtain the user sample address and target project version number based on the user sample configuration information, and obtain a component version list based on the user sample address and target project version number. Specifically, it downloads dependency information matching the component version list from the component dependency result file stored on the server. Further, the download module 301 is also used to, after obtaining the component version list, download matching dependency information from the component dependency result file stored on the server based on the component version list.

[0097] Parsing module 302 is used to parse the dependency information to obtain the dependency information parsing result;

[0098] In this disclosure, the parsing module 302 is used to parse the dependency information and obtain at least the component version number and component version address corresponding to each component as the dependency information parsing result.

[0099] The lookup module 303 is used to repeatedly obtain the component version list corresponding to the user sample, and search for the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result;

[0100] In this disclosure, the lookup module 303 is specifically used to look up the dependency information parsing results and the component version list respectively, find the same components, and prepare for component version alignment.

[0101] The search module 303 includes a loop search submodule and a version number search submodule. The loop search submodule is used to iteratively obtain a sequence of available historical version numbers for each component corresponding to the user sample, wherein the priority of the historical version number in the version sequence is associated with the version release time. The version number search submodule is used to obtain the component version number used by the target project from the dependency information parsing results.

[0102] In this disclosure, the lookup module 303 retrieves the same component from the dependency information parsing results and the component version list, and then obtains the component version number used by the target project from the dependency information parsing results. This solution can obtain the version of the component that needs to be aligned by obtaining the component version number used by the target project.

[0103] The setting module 304 is used to set the component version number as the priority position in the component version list and obtain the updated component version list.

[0104] In this disclosure, the setting module 304 is specifically used to set the component version number that is the same as that used in the target project in the component version list as the priority version number, and set it to the priority position to obtain a new component version list.

[0105] The determination module 305 is used to determine the version corresponding to each component of the user sample based on the updated component version list.

[0106] In this disclosure, the determining module 305 is specifically used to determine the version of a component based on the component version number with the first priority in the current version sequence of the component if no changes to the component's dependencies are detected in the component in the user sample; otherwise, the version number is obtained from the component version list in order of priority for version determination.

[0107] In another embodiment, the determining module 305 is specifically used to detect components that are the same as those in the dependency information parsing result and the component version list. The component version number in the component version list is the priority version number. That is, if the component version number used by the target project has been set to the first priority position in the component version list, and no user change of related dependencies is detected, the dependency arbitration is determined to be successful; otherwise, the next component version number in the first priority position is obtained from the component version list.

[0108] In a third aspect of this disclosure, an electronic device is provided, as described below. Figure 4 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0109] like Figure 4 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 406 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0110] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 406 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0111] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 406, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0112] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0113] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0114] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0115] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive a voice signal from a first device; parse the voice signal to obtain a second device identifier and a second device control command; send the second device control command to the second device according to the second device identifier; receive the execution result of the second device control command from the second device; and send the execution result of the second device control command to the first device.

[0116] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0118] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0119] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0120] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0121] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0122] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0123] It should be understood that the above detailed description of the technical solutions of this disclosure by means of preferred embodiments is illustrative and not restrictive. Those skilled in the art can modify the technical solutions described in the various embodiments or make equivalent substitutions for some of the technical features based on reading this disclosure; however, such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this disclosure.

Claims

1. A method of determining an assembly version, characterized by, include: Obtain the dependency information of the target project based on user input, wherein the target project is the synchronized project corresponding to the user sample; The dependency information is parsed to obtain the dependency information parsing result; The component version list corresponding to the user sample is obtained in a loop. The component version number corresponding to the component that is the same as each component in the component version list is found in the dependency information parsing result. The component version list includes the component version number corresponding to multiple components. Set the component version number as the priority in the component version list, and obtain the updated component version list; The version corresponding to each component of the user sample is determined based on the updated component version list; The dependency information of the target project is obtained based on the component dependency result file, which is stored on the server for information sharing. The component dependency result file includes a release component dependency list generated based on the version information of the target project.

2. The method as described in claim 1, characterized in that, The loop retrieves the list of component versions corresponding to the user sample, including: For each component corresponding to the user sample, a version sequence of available historical version numbers for each component is obtained cyclically, wherein the priority of the historical version number in the version sequence is related to the version release time.

3. The method as described in claim 1, characterized in that, The step of finding the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result includes: Obtain the component version number of the component used by the target project from the dependency information parsing results.

4. The method as described in claim 3, characterized in that, Setting the component version number as a priority digit in the component version list includes: The component version number that is the same as the one used in the target project in the component version list is taken as the priority version number and set to the first priority position of the corresponding component's version sequence to obtain the updated component version list.

5. The method as described in claim 4, characterized in that, The step of determining the version corresponding to each component of the user sample based on the updated component version list includes: If no changes to the dependencies of a component in a user sample are detected, the version of the component is determined based on the component version number with the highest priority in the current version sequence. Otherwise, the version number is obtained from the component version list in order of priority to determine the version.

6. The method as described in claim 1, characterized in that, The step of obtaining the dependency information of the target project based on user input includes: Generate a component dependency result file based on the version information of the target project, and save the component dependency result file to the server; Obtain user sample configuration information and save the user sample configuration information; Based on the user sample configuration information, download the dependency information of the target project corresponding to the user sample from the component dependency result file.

7. The method as described in claim 6, characterized in that, The step of generating a component dependency result file based on the version information of the target project and saving the component dependency result file to the server includes: The component version address and component version number of each component are obtained from the version information of the target project. The obtained component version address and component version number of each component are mapped to generate a release component dependency list. The release component dependency list is then saved as a component dependency result file to the server.

8. The method as described in claim 7, characterized in that, The step of obtaining and saving the user sample configuration information includes: The user sample configuration information is obtained and saved using a separate command.

9. A component version determination device, characterized in that, include: The download module is used to obtain the dependency information of the target project based on user input, wherein the target project is the synchronized project corresponding to the user sample; The parsing module is used to parse the dependency information and obtain the dependency information parsing result; The lookup module is used to repeatedly obtain the component version list corresponding to the user sample, and search for the component version number corresponding to the component that is the same as each component in the component version list from the dependency information parsing result. The component version list includes component version numbers corresponding to multiple components. The setting module is used to set the component version number as the priority position in the component version list and obtain the updated component version list. The determination module is used to determine the version corresponding to each component of the user sample based on the updated component version list; The dependency information of the target project is obtained based on the component dependency result file, which is stored on the server for information sharing. The component dependency result file includes a release component dependency list generated based on the version information of the target project.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed, enables the implementation of the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method for automatically detecting dependency conflict problem in Maven project based on GitHub

    CN112799937A

  • Common component testing method and device, electronic equipment and storage medium

    CN113392010A