A component scheduling method and system for new energy vehicle management software
By generating integration URLs and using cloud servers to start components, the problem of memory usage when starting components in new energy vehicle management software is solved and the efficiency and security of component scheduling are achieved.
Patent Information
- Application Number
- CN202011370985.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-11-30
AI Technical Summary
In the existing technology, it is easy to confuse remote startup and local startup when the components of new energy vehicle management software are started, and the URL corresponding to each component occupies a large amount of memory, resulting in memory usage problems.
By obtaining the component collection, it is judged whether all the components are local components. If not, an integrated URL is generated and registered to the server. The cloud server is used to start the component, reducing the number of URLs and memory usage.
By dividing multiple remote components into a component set and generating integrated URLs to start remote components, the number of URLs is reduced, the memory occupied by the URL table is reduced, and efficiency and security are improved.
Smart Images

Figure CN112486705B
Abstract
Description
Technical Field
[0001] The present invention relates to software interaction, and in particular to a component scheduling method and system for new energy vehicle management software. Background Art
[0002] As software functions become more and more complex, the code structure will become more and more complex. To modify a small function, you may have to review the code of the entire project and modify all the same places. The repetitive work wastes time and manpower and is inefficient. With componentization, each identical functional module can start the same component, and you only need to modify this component to make global modifications. In order to reduce the workload of software development and simplify the software code, the repeated code can be extracted and merged into components. The most important thing about components is reuse. Components are at the bottom of the framework, and other functions depend on components. They can be used by different functions and have strong independence. Therefore, in order to simplify the code and improve efficiency, componentization is performed in the modern software development process.
[0003] In the prior art, when starting an APP, each component module will register a URL (Uniform Resource Locator) with the component manager deployed locally; the component manager generates a URL and, when component A needs to start component B, component A passes the URL of component B to the component manager, and the component manager schedules component B according to the URL of component B, thereby completing the scheduling process. However, some components need to rely on remote servers to implement corresponding functions. Therefore, when URLs are assigned for remote and local startups during component startup, it is easy to confuse remote startup with local startup. Therefore, the invention patent application with application number 2019112779565 in the prior art discloses a component startup method, device and computer-readable medium, which receives and parses the component startup request to obtain the name of the component to be started, determines whether the component startup request is a remote startup request or a local startup request, and if the component startup request is a local startup request, starts and runs the local startup function from the pre-built component startup library; if the component startup request is a remote startup request, parses the URL of the remote startup request, starts the remote startup function from the component startup library, uses the URL as the startup parameter of the remote startup function, and runs the remote startup function. This invention reduces the capacity of the URL registry, thereby solving the problem of not distinguishing between remote startup and local startup and consuming memory when components are started.
[0004] However, the inventors found that although the prior art avoided the confusion caused by local startup and remote startup, each software component corresponding to a URL still occupied a lot of URL table space. Therefore, the prior art had the technical problem of occupying a large amount of memory. Summary of the invention
[0005] The technical problem to be solved by the present invention is how to provide a component scheduling method and system for new energy vehicle management software to reduce memory usage.
[0006] The present invention solves the above technical problems through the following technical means:
[0007] In a first aspect, the present invention provides a component scheduling method for new energy vehicle management software, which is applied to a user terminal, and the method comprises:
[0008] Acquire a current component set obtained by pre-dividing components in the management software, and at least one current component set includes two or more components;
[0009] For each current component set, determining whether all components included in the current component set are local components;
[0010] If not, generating a corresponding integration URL according to the characteristic information of the current component set, and registering the integration URL with the server, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information;
[0011] Receive a first operation instruction input by the user, and obtain the integration URL of the current component set corresponding to the first operation instruction, so that the cloud server starts the corresponding service process and establishes a data connection between the service process and the corresponding component after receiving the integration URL sent by the component manager.
[0012] Optionally, the obtaining of a current component set obtained by pre-dividing components in the management software includes:
[0013] Determine in advance the order of components started by user operations according to the functional usage rules of the management software or the user's habits of using the management software, and obtain a component startup sequence;
[0014] The component startup sequence is divided into several current component sets by taking the startup time interval whose duration is greater than a preset threshold in the component startup sequence as a split point.
[0015] Optionally, when dividing the component startup sequence into a plurality of current component sets, the method further includes:
[0016] For each current component set, the order in which the components are started by user operations is sent to the cloud server, so that after receiving the integration URL sent by the component manager, the cloud server starts the corresponding service processes in sequence according to the order in which the components are started by user operations and establishes data connections between the service processes and the corresponding components.
[0017] Optionally, generating a corresponding integration URL according to the feature information of the current component set includes:
[0018] The characteristic information corresponding to the current component set is used as the input of the URL generator to generate an integrated URL, wherein the characteristic information includes: component startup sequence information, management software version information, user terminal identification information or a combination thereof.
[0019] Optionally, the method further includes:
[0020] Receive a second operation instruction input by the user, parse to obtain a component set corresponding to the second operation instruction, and use the components in the component set corresponding to the second operation instruction except for the components that have been connected to the server data as the current component set; and return to execute the step of determining whether all components contained in the target current component set are local components until the user no longer inputs the second operation instruction.
[0021] In a second aspect, based on the method of the first aspect, the present invention also provides another component scheduling method of new energy vehicle management software, which is applied to a server, and the method includes:
[0022] Receiving the integration URL sent by the component manager on the user terminal;
[0023] Parsing the integration URL to obtain characteristic information of the current component set, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information;
[0024] The corresponding service process is acquired according to the characteristic information and started, and a data connection between the started service process and the component is established.
[0025] Optionally, before receiving the integration URL sent by the component manager on the user terminal, the method further includes:
[0026] Receive in advance the sequence of components started by user operations sent by the component manager.
[0027] Optionally, acquiring and starting a corresponding service process according to the characteristic information includes:
[0028] The corresponding service process is obtained according to the characteristic information, and the corresponding service process is started in sequence according to the sequence and a data connection between the service process and the corresponding component is established.
[0029] In a third aspect, the present invention also provides a component scheduling system for new energy vehicle management software, the system comprising: a user terminal and a server, wherein:
[0030] The user terminal as described in the first aspect;
[0031] A server as described in the second aspect.
[0032] The advantages of the present invention are:
[0033] By applying the embodiment of the present invention, several remote components are divided into a current component set, and a corresponding integrated URL is generated for the current component set. The integrated URL is then used to start the remote component, thereby reducing the number of URLs that need to be generated and reducing the memory occupied by the URL table. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of a flow chart of a component scheduling method for new energy vehicle management software provided by an embodiment of the present invention;
[0035] Figure 2 Schematic diagram of the componentized architecture of the new energy vehicle management software in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Example 1
[0038] First of all, it should be noted that the embodiment of the present invention is preferably applicable to a component scheduling system of new energy vehicle management software, and the system includes: a user terminal and a server. The working process of the user terminal is first introduced in Example 1 below.
[0039] Figure 1 A schematic diagram of a flow chart of a component scheduling method for new energy vehicle management software provided by an embodiment of the present invention, such as Figure 1 As shown, Embodiment 1 of the present invention provides a component scheduling method for new energy vehicle management software, the method comprising:
[0040] S101: obtaining a current component set obtained by pre-dividing components in management software, and at least one current component set includes two or more components.
[0041] For example, Figure 2 FIG. 1 is a schematic diagram of the componentized architecture of the new energy vehicle management software in an embodiment of the present invention. Figure 2As shown in the figure, the new energy vehicle management software is divided into two layers in terms of architecture: the functional layer and the component layer. The management software and the user realize human-computer dialogue at the functional layer; the user inputs control commands at the functional layer, such as refueling function, maintenance function, attendance function, commuter bus function, holiday travel function, etc.; the component manager at the component layer starts the corresponding component according to the control command received by the user terminal. There are several components in the component layer. For example, there can be business components, and there can also be third-party components, such as MJRefresh, JsonModel, Masonry, etc., which are used to provide services such as control refresh and data parsing; there can also be public components, such as public view components, image resource library components, macro definition components, etc., which are used to provide interface display services, batch processing and other services.
[0042] First, the user roles of the new energy vehicle management software in the embodiment of the present invention include: driver, administrator, approver, auto repair shop and other roles. In the embodiment of the present invention, different human-computer interaction interfaces are assigned to different user roles. The function icons and texts of the function icons on the human-computer interaction interface used by users of different roles are different, and the corresponding specific function modules are also different. Taking the driver as an example, the order in which the driver uses the various function modules of the management software can be obtained based on the user's professional habits. A certain function module of the management software used by the user requires a series of multiple components to work together to achieve it, and there is a startup sequence for the startup of each component that realizes the specific function of the function module, and then the order of the components started by the driver's operation can be obtained. Furthermore, the current component set can be divided for each driver separately.
[0043] The obtained startup sequence of functional modules and components is:
[0044] Functional module 1: component 1, component 2, component 3, component 4;
[0045] Functional module 2: component 7, component 4, component 1, component 5;
[0046] Functional module 4: component 11, component 4, component 2, component 3.
[0047] Then, since when a user uses a certain functional module, there is generally a process of reading, thinking or operating, which results in the user using the current functional module before using the next functional module after a certain time interval, which results in different time intervals between the activated components.
[0048] Then, the component startup sequence obtained by sorting the component startup times is divided into several current component sets according to the time interval. In the embodiment of the present invention, one functional module corresponds to one current component set as an example for explanation.
[0049] In practical applications, if the time interval between the driver's operation of two functions is less than a first preset threshold, the components corresponding to the two functions may be grouped into one current component set. Typically, one functional module corresponds to one current component set.
[0050] In another specific implementation of obtaining the component startup sequence in this step, usage rules can also be preset for the new energy vehicle management software: for example, during the publicity period of some rules and regulations, news, and party and government propaganda, the function modules corresponding to these contents are used as the function modules that the user needs to use first after starting the management software.
[0051] Alternatively, on special holidays, such as Traffic Safety Day and National Day, corresponding usage rules can be set for corresponding users. For example, on National Day, the push function can be used to push National Day poster images to the management software terminal used by the user, and the poster image pop-up window can be displayed on the terminal interface. After the user views it, the user manually closes it before being able to use the management software normally.
[0052] Alternatively, the user may set some priority displays or priority reminders according to their actual needs, such as the next day's work schedule, to achieve priority startup of corresponding functions; and then obtain the corresponding component startup sequence.
[0053] In actual applications, the remote push process can also be used to implement the setting of usage rules; in this way, the functional usage rules of the management software are preset, and then the corresponding component startup sequence can be obtained, which can realize personalized and flexible software functions.
[0054] It can be understood that the components described in this step may be components in the same APP, or may include components in other APPs.
[0055] S102: for each current component set, determine whether all components included in the current component set are local components; if not, execute step S103.
[0056] Exemplarily, for each functional module in step S101, each component in functional module 1, functional module 2, and functional module 4 is judged one by one.
[0057] For example, each component started by functional module 1 is a local component, that is, the function of functional module 1 does not need to rely on the cloud server to be implemented. Therefore, there is no need to generate a corresponding integration URL for functional module 1. The method for starting a local component is a prior art, and the embodiment of the present invention will not be repeated here.
[0058] Among the components started by the functional module 2, component 4 and component 7 are remote components and need to rely on the cloud server for implementation. Therefore, it is necessary to execute step S103 to generate an integration URL for the functional module 2.
[0059] Components corresponding to other functional modules are processed according to the above method, and the embodiments of the present invention will not be described one by one here.
[0060] S103: Generate a corresponding integrated URL according to the characteristic information of the current component set, and register the integrated URL to the server, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information.
[0061] Exemplarily, the components that function module 2 needs to start are: component 7, component 4, component 1, component 5, wherein component 1 and component 5 are both local components; component 7 and component 4 are remote components.
[0062] Since users in different regions may use different versions of management software, or users of different roles may have different personalized settings for the same functional module, which leads to differences in the component startup order corresponding to different terminals, the number of component startup orders for each terminal obtained on the server is relatively large. Therefore, when generating an integrated URL, the startup order of each component corresponding to functional module 2 is added to the integrated URL as a characteristic character. For example, the user terminal identification information corresponding to functional module 2 can be used as a selected field in the integrated URL, and then the integrated URL is registered to the cloud server. It is also possible to number each component, arrange the corresponding numbers into a string according to the startup order as a selected field in the integrated URL, and then register the integrated URL to the cloud server. The user terminal identification information can be one of the hardware identification information or IP address of the terminal where the component manager is located.
[0063] By applying the embodiment of the present invention, the function module that the user first starts each time may also change, even if the criminals intercept the integrated URL of the function module that the user uses for the first time; however, when the user uses the management software next time, the function module may not be started first. Therefore, a new URL will be generated for the same function module at different usage times; compared with the relatively simple setting of a specific URL for each function module, the embodiment of the present invention generates more URLs, is more difficult to be invaded, and thus improves security.
[0064] Furthermore, an encryption algorithm may be used to encrypt the characteristic information, and then selected fields in the encryption result may be selected and used as the characteristic information.
[0065] In actual applications, if the usage rules cannot unequivocally determine which functional module the user uses first, corresponding first integrated URLs may be generated for each current component set and registered separately.
[0066] S104: Receive a first operation instruction input by the user, and obtain the integration URL of the current component set corresponding to the first operation instruction, so that the cloud server starts the corresponding service process and establishes a data connection between the service process and the corresponding component after receiving the integration URL sent by the component manager.
[0067] After the user actually operates, it is possible to determine which functional module the user has used, and then determine the corresponding current component set; therefore, the cloud server is accessed according to the integrated URL generated in step S103.
[0068] After receiving the integration URL sent by the component manager, the cloud server parses the integration URL to obtain the corresponding user terminal identification information and the corresponding component startup sequence, and then sequentially starts the corresponding service processes and establishes data connections between the service processes and the corresponding components.
[0069] In another specific implementation of Example 1, for management software with no personalized requirements or relatively simple personalized requirements, the component startup sequence needs to be added each time a URL is generated, which will increase the length of the URL. Therefore, the user terminal will obtain the usage order of each function according to the usage rules, and then obtain the corresponding component startup sequence. Then, the component startup sequence of each terminal is obtained according to its own software version information, personalized settings and other information, and the corresponding component startup sequence is sent to the cloud server in advance, so that the server can associate the corresponding component startup sequence with unique data such as the user terminal identification information and the identification information of the hardware device on which the component manager is installed.
[0070] The characteristic information of the current component set in step S101 may be the user terminal identification information and the function module identification, or the version information and the function module identification of the software corresponding to the component manager, or the hardware number information and the function module identification of the device where the component manager is located. After receiving the access request from the user terminal according to the integrated URL, the server queries the corresponding component startup sequence according to the user terminal identification information, the identification information of the hardware device where the component manager is installed, and other unique data, and then obtains the corresponding current component set according to the function module identification in the URL, and then starts the corresponding service process according to the component startup sequence of the current component set.
[0071] Furthermore, in order to reduce the communication burden of the cloud server, drivers from the same department or the same company usually need to meet or study together; moreover, these drivers are all within the management scope of the same management rules, so it is highly likely that these drivers use the same version information of the management software and have the same functional requirements or certain personalized settings of the software. The component manager can communicate with the component manager on the other terminal when the two use the same wifi or when the two are within the Bluetooth communication range of the mobile phone to obtain the setting information and version information of the other component manager; when the setting information, version information and other information that affect the component startup sequence of the two are completely consistent, ask the component manager of the other terminal whether it has uploaded the component startup sequence information, and if so, send the user terminal identification information of the other terminal and its own identification information to the cloud server to replace the upload of the component startup sequence information, thereby reducing the amount of data to be uploaded and reducing the communication burden of the cloud server.
[0072] Example 2
[0073] Embodiment 2 of the present invention adds the following steps on the basis of embodiment 1: receiving a second operation instruction input by the user, parsing to obtain a component set corresponding to the second operation instruction, and taking the components in the component set corresponding to the second operation instruction except for the components that have been connected to the server data as the current component set; and returning to execute the step of determining whether all components contained in the target current component set are local components until the user no longer inputs the second operation instruction.
[0074] Exemplarily, after the terminal responds to the completion of the first operation instruction, the user may continue to operate the terminal device, that is, the user may continue to input the second operation instruction.
[0075] The component manager parses the second operation instruction to obtain the component set A that needs to be started by the operation instruction, and compares the components in the component set A with the components that have been started by the first operation instruction one by one. If any component in the component set A has been started, the set of components in the component set A except the components that have been started is used as the current component set, and then the steps of Example 1 are executed.
[0076] In the embodiment of the present invention, after the remote component that has been scheduled by the first operation instruction has established a data connection with the cloud server, there is no need to restart it. Therefore, the application of the embodiment of the present invention avoids the terminal from repeatedly starting the remote component and reduces the workload of the cloud server.
[0077] Furthermore, since different integration URLs are generated for the current component sets of different functional modules in step S101, some functional modules, such as functional module X, are not started by the user first, and their corresponding components are not started by the component manager; therefore, when the user starts the current component set corresponding to functional module X after starting other functional modules, some components do not need to be started. Therefore, the integration URL corresponding to functional module X is different from the integration URL in step S101. Therefore, the URL for starting the functional module after the user starts other functional modules changes dynamically, thereby improving security.
[0078] Example 3
[0079] First of all, it should be noted that Embodiment 3 of the present invention is preferably applicable to a server in a component scheduling system of new energy vehicle management software.
[0080] Based on Embodiment 1 or 2, Embodiment 3 of the present invention provides another component scheduling method of new energy vehicle management software, the method comprising:
[0081] Receiving the integration URL sent by the component manager on the user terminal;
[0082] Parsing the integration URL to obtain characteristic information of the current component set, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information;
[0083] The corresponding service process is acquired according to the characteristic information and started, and a data connection between the started service process and the component is established.
[0084] In a specific implementation of the embodiment of the present invention, before receiving the integration URL sent by the component manager on the user terminal, the method further includes:
[0085] Receive in advance the sequence of components started by user operations sent by the component manager.
[0086] In a specific implementation of the embodiment of the present invention, the characteristic information obtains and starts a corresponding service process, including:
[0087] The corresponding service process is obtained according to the characteristic information, and the corresponding service process is started in sequence according to the sequence and a data connection between the service process and the corresponding component is established.
[0088] Example 4
[0089] Embodiment 4 of the present invention provides a component scheduling system for new energy vehicle management software, the system comprising: a user terminal and a server, wherein:
[0090] The user terminal is used to obtain a current component set obtained by pre-dividing components in the management software, and at least one current component set includes two or more components;
[0091] For each current component set, determining whether all components included in the current component set are local components;
[0092] If not, generating a corresponding integration URL according to the characteristic information of the current component set, and registering the integration URL with the server, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information;
[0093] Receive a first operation instruction input by a user, and obtain an integration URL of the current component set corresponding to the first operation instruction, so that the cloud server starts a corresponding service process and establishes a data connection between the service process and the corresponding component after receiving the integration URL sent by the component manager;
[0094] The server is used to: receive the integration URL sent by the component manager on the user terminal;
[0095] Parsing the integration URL to obtain characteristic information of the current component set, wherein the characteristic information includes: one or a combination of component startup sequence, user terminal identification information, and management software version information;
[0096] The corresponding service process is acquired according to the characteristic information and started, and a data connection between the started service process and the component is established.
[0097] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A component scheduling method for new energy vehicle management software, characterized in that: The method comprises: The user terminal obtains a current component set obtained by pre-dividing the components in the management software, and at least one current component set includes two or more components, including: determining the order of components started by user operations in advance according to the functional use rules of the management software or the user's habit of using the management software, and obtaining a component startup sequence; using the startup time interval in the component startup sequence with a duration greater than a preset threshold as a split point, dividing the component startup sequence into a plurality of current component sets; The user terminal determines, for each current component set, whether all components included in the current component set are local components; If not, generate a corresponding integration URL according to the characteristic information of the current component set, and register the integration URL with the cloud server, wherein the characteristic information includes: the startup sequence of the components and the user terminal identification information; The user terminal receives the first operation instruction input by the user, obtains the integration URL of the current component set corresponding to the first operation instruction, so that the cloud server starts the corresponding service process and establishes a data connection between the service process and the corresponding component after receiving the integration URL sent by the component manager; The cloud server receives the integration URL sent by the component manager on the user terminal, and parses the integration URL to obtain characteristic information of the current component set, wherein the characteristic information includes: the startup sequence of the components and the user terminal identification information; The cloud server obtains and starts the corresponding service process according to the characteristic information, and establishes a data connection between the started service process and the component.
2. A component scheduling method for new energy vehicle management software according to claim 1, characterized in that: The generating a corresponding integration URL according to the characteristic information of the current component set includes: The characteristic information corresponding to the current component set is used as the input of the URL generator to generate an integrated URL, wherein the characteristic information includes: component startup sequence information and user terminal identification information.
3. The component scheduling method of new energy vehicle management software according to claim 1 is characterized in that: The method further comprises: Receive a second operation instruction input by the user, parse to obtain a component set corresponding to the second operation instruction, and use the components in the component set corresponding to the second operation instruction except for the components that have been data-connected to the cloud server as the current component set; and return to execute the step of determining whether all components contained in the target current component set are local components until the user no longer inputs the second operation instruction.
4. The component scheduling method of new energy vehicle management software according to claim 1, characterized in that: The obtaining and starting a corresponding service process according to the characteristic information includes: The corresponding service process is acquired according to the characteristic information, and the corresponding service process is started in sequence according to the startup sequence of the components, and a data connection between the service process and the corresponding component is established.
